Imaging device and control method for imaging device

ABSTRACT

An imaging device, comprising a movement range restriction section, that, at the time of shooting standby, when rotating the image sensor based on detection result from an angular speed detection sensor or calculation result from a horizontal angle calculation section, restricts a region in which the image sensor is capable of moving to a first region that includes a central region of the optical axis of a photographing optical system, so as to maximize an angular range in which the image sensor can rotate, wherein, based on an instruction of a shooting instruction interface, the movement range restriction section sets a range in which the image sensor is capable of moving to a second region that includes the first region, and that is wider than at the time of shooting standby.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of PCT Application No.PCT/JP2019/035788, filed on Sep. 11, 2019, the entire contents of whichare incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to an imaging device, and a control methodfor an imaging device, that can correct a taken image horizontally withrespect to an image frame, together with performing image stabilizationto remove the effects of camera shake.

2. Description of the Related Art

There are three types of image blur caused by camera shake, which areangular blur (Pitch and Yaw), shift blur (X, Y), and rotational blur(Roll). Among these types of image blur, it has been proposed to correctangular blur and shift blur by moving a correction lens at thephotographing lens side and/or an image sensor at the body side on aplane that is orthogonal to the optical axis, and further correctingrotational blur by rotating the image sensor about the optical axis, asrequired. (Refer to Japanese patent laid open No. 2006-71743 (hereaftercalled patent publication 1).) On the other hand, automatic horizontalcorrection technology has been previously proposed to detect inclinationof an imaging device, and makes it possible to shoot a horizontal imageby rotating an image sensor about the optical axis (refer to Japanesepatent laid-open No. Hei. 4-331586 (hereafter called patent publication2) and Japanese patent No. 3360376 (hereafter referred to as patentpublication 3)). Technology has also been proposed to make correctionangle range for automatic horizontal correction large in a case whereimage stabilization amount is small, and conversely to restrictcorrection angle range for automatic horizontal correction to a smallrange in a case where camera shake correction amount is large (refer toJapanese patent No. 6105880 (hereafter called patent publication 4)).

If image stabilization and automatic horizontal correction are performedsimultaneously, rotational blur correction and automatic horizontalcorrection are performed together by rotating the image sensor. However,since there is a physical restriction on a rotation possible angularrange, if rotational blur correction is made sufficiently effective anangular range for automatic horizontal correction becomes insufficient,while conversely if automatic horizontal correction is made sufficientlyeffective the efficiency of rotational blur correction becomesinsufficient. This similarly applies to angular blur correction andshift blur correction, and as correction angular range for automatichorizontal correction becomes larger a movable range for angular blurcorrection and shift below correction becomes narrow and it is no longerpossible to ensure sufficient image blur correction, and conversely, ifsufficient image blur correction is ensured a correction angle range forautomatic horizontal correction becomes narrow.

In order to deal with this problem, technology for making correctionangle range for automatic horizontal correction large in the case of asmall image stabilization amount, and conversely restricting correctionangle range for automatic horizontal correction to a small range in thecase of a large camera shake correction amount, has been proposed, aswas described previously (refer to patent publication 4). However,considering the fact that the more likely a photographer is to causecamera shake, the more likely the photographer is to shoot tiltedphotographs, it should be noted that the effects of leveling areimpaired in accordance with extent of camera shake. Also, if results ofleveling each time shooting is performed vary depending on the extent ofimage stabilization on each occasion, such an imaging device cannot besaid to be a good user-friendly device for a photographer using thedevice.

SUMMARY OF THE INVENTION

The present invention provides a novel imaging device and control devicefor an imaging device that solve the problem of image stabilization andhorizontal correction being inconsistent with each other, and that canperform both types of correction sufficiently. There is also provided anovel imaging device and control device for an imaging device that havegood usability such that it is possible to easily shoot a horizontalimage with high precision.

According to a first aspect of the present invention, an imaging device,that forms a subject image on an image sensor using an imaging opticalsystem, and acquires an image, comprises an angular speed detectionsensor that detects angular speed of the imaging device, a horizontalcorrection instruction interface for instructing horizontal correctionof the image sensor or an output image of the image sensor with respectto an image frame, a processor having a horizontal angle calculationsection that detects vertical direction or horizontal direction of theimaging device or the image sensor, and calculates and outputs a firstangle around the optical axis of the image sensor in order tohorizontally correct the image sensor or an output image of the imagesensor with respect to an image frame, an image sensor drive actuatorthat rotates the image sensor around the optical axis based on detectionresult from the angular speed detection sensor or calculation resultfrom the horizontal angle calculation section, and a shootinginstruction interface for instructing preparation or commencement ofshooting, the processor further comprising a movement range restrictionsection, the movement range restriction section, at the time of shootingstandby, when rotating the image sensor based on detection result fromthe angular speed detection sensor or calculation result from thehorizontal angle calculation section, restricting a region in which theimage sensor is capable of moving to a first region that includes acentral region of the optical axis, so as to maximize an angular rangein which the image sensor can rotate, and wherein, based on aninstruction of the shooting instruction interface, the movement rangerestriction section sets a range in which the image sensor is capable ofmoving to a second region that includes the first region, and is widerthan at the time of shooting standby.

According to a second aspect of the present invention, a control methodfor an imaging device, that forms a subject image on an image sensorusing an imaging optical system, and acquires an image, comprisesdetermining whether or not horizontal correction of the image sensor oran output image of the image sensor with respect to an image frame hasbeen instructed, detecting angular speed of the imaging device,detecting vertical direction or horizontal direction of the imagingdevice or the image sensor, and calculating a first angle about theoptical axis of the image sensor in order to horizontally correct theimage sensor or an output image of the image sensor with respect to animage frame, rotating the image sensor about the optical axis based ondetection result of the angular speed or the first angle, at the time ofshooting standby, when rotating the image sensor based on detectionresult of the angular speed or the first angle, restricting a region inwhich the image sensor is capable of moving to a first region thatincludes a central region of the optical axis, so as to maximize anangular range in which the image sensor can rotate, and in a case wherepreparation or commencement has been instructed, setting a region inwhich it is possible to move the image sensor to a second region thatincludes the first region, and that is wider than at the time ofshooting standby.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an external perspective view looking from a rear surface of acamera of one embodiment of the present invention.

FIG. 2A and FIG. 2B are block diagrams mainly showing the electricalstructure of a camera of one embodiment of the present invention.

FIG. 3 is a flowchart showing main operation of the camera of oneembodiment of the present invention.

FIG. 4 is a flowchart showing lens information acquisition processing ofthe camera of one embodiment of the present invention.

FIG. 5A and FIG. 5B are flowcharts showing live view display processingof the camera of one embodiment of the present invention.

FIG. 6 is a flowchart showing operation to restrict movement range of animage sensor to a central portion, for the camera of one embodiment ofthe present invention.

FIG. 7A is a graph showing a relationship between central portionrestricted range W and camera shake amount TB, in the camera of oneembodiment of the present invention.

FIG. 7B is a graph showing a relationship between central portionrestricted range W and shutter speed SS, in the camera of one embodimentof the present invention.

FIG. 7C is a graph showing a relationship between central portionrestricted range W and focal length f, in the camera of one embodimentof the present invention.

FIG. 8A and FIG. 8B are flowcharts showing first angle computationalprocessing performed concurrently with main operation, in the camera ofone embodiment of the present invention.

FIG. 9 is a drawing showing a first angle and a second angle, in thecamera of one embodiment of the present invention.

FIG. 10A is a graph show an example of response characteristics due tofirst angle setting and rotational blur correction, in a case wherethere is normal camera shake, in the camera of one embodiment of thepresent invention.

FIG. 10B is a graph show an example of response characteristics due tofirst angle setting and rotational blur correction, in a case wherecamera shake is intense, in the camera of one embodiment of the presentinvention.

FIG. 100 is a graph show an example of response characteristics due tofirst angle setting and rotational blur correction, in a case wherecamera shake is small, in the camera of one embodiment of the presentinvention.

FIG. 11 is a drawing for describing image data trimming and resizingprocessing (1), in the camera of one embodiment of the presentinvention.

FIG. 12 is a drawing for describing image data trimming and resizingprocessing (2), in the camera of one embodiment of the presentinvention.

FIG. 13 is a flowchart showing automatic horizontal GUI (abbreviation ofGraphic User Interface) display processing for the camera of oneembodiment of the present invention.

FIG. 14 is a flowchart showing a modified example of automatichorizontal GUI display processing of the camera of one embodiment of thepresent invention.

FIG. 15A and FIG. 15B are flowcharts showing spirit level displayprocessing of the camera of one embodiment of the present invention.

FIG. 16A is a drawing showing an example of spirit level display for astate where the camera is not horizontal (F1), and a state where thecamera is horizontal (F2), in the camera of one embodiment of thepresent invention.

FIG. 16B is a drawing showing an example of spirit level display for astate where the camera is tilted (F3), and a state where the camera isnot tilted (F4), in the camera of one embodiment of the presentinvention.

FIG. 16C is a drawing showing display examples for spirit level displayin a state where automatic horizontal correction shooting is notpossible (F5) and a state where automatic horizontal correction ispossible (F6), in the camera of one embodiment of the present invention

FIG. 16D is a drawing showing a modified example of display of spiritlevel display in a state where automatic horizontal correction shootingis not possible (F7) and a state where automatic horizontal correctionis possible (F8), in the camera of one embodiment of the presentinvention

FIG. 17 is a flowchart showing operation member processing of the cameraof one embodiment of the present invention.

FIG. 18 is a flowchart showing automatic leveling button pressingprocessing of the camera of one embodiment of the present invention.

FIG. 19 is a flowchart showing dial rotation while button is pressedprocessing of the camera of one embodiment of the present invention.

FIG. 20 is a flowchart showing 1st ON processing of the camera of oneembodiment of the present invention.

FIG. 21 is a flowchart showing still picture shooting processing of thecamera of one embodiment of the present invention.

FIG. 22A to FIG. 22C are flowcharts showing still picture shootingprocessing at the time of automatic horizontal correction, for thecamera of one embodiment of the present invention.

FIG. 23 is a flowchart showing image processing of the camera of oneembodiment of the present invention.

FIG. 24 is a flowchart showing image processing at the time of automatichorizontal correction, for the camera of one embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following, an example where the present invention has beenapplied to an imaging device will be described as one embodiment of thepresent invention. This imaging device forms a subject image on an imagesensor using an imaging optical system, and acquires an image. In thedescription of this embodiment, an example where the present inventionhas been applied to a camera, as an imaging device, will be described.This digital camera is a digital camera, and has an imaging section,with a subject image being converted to image data by this imagingsection, and the subject image being subjected to live view display on adisplay section arranged on the rear surface of the camera body orwithin a viewfinder based on this converted image data. A photographerdetermines composition and photo opportunity by looking at the live viewdisplay. If the photographer performs a release operation, image data isstored in a storage medium. Image data that has been stored in thestorage medium can be subjected to playback display on the displaysection if playback mode is selected.

Also, the camera of this embodiment has an image stabilization functionand an automatic horizontal correction function, and in a case where theautomatic horizontal correction function is put into operation, an imagesensor or an output image of the image sensor is horizontally correctedwith respect to an image frame. In a case of performing this automatichorizontal correction at the time of shooting standby, a region in whichmovement of the image sensor is possible is restricted to an area thatcontains an optical axis center region, while at the time of shootingwhere image stabilization is performed, a region in which movement ispossible is made wider than at the time of shooting standby.

FIG. 1 is an external perspective view looking from a rear surface of acamera 1 of this embodiment. This camera 1 comprises an interchangeablelens 200 and a camera body 100. The interchangeable lens 200 can beattached to the camera body 100, and if the interchangeable lens 200 isattached to the camera body 100 a subject image is formed on an imagesensor 105 (refer to FIG. 2B) within the camera body 100. It should benoted that a photographing lens barrel and the camera body may also beformed integrally.

A zoom ring that is freely rotatable is provided on the outside of theinterchangeable lens 200 in order to adjust focal length. A imagestabilization on/off switch is also provided on the outside of theinterchangeable lens 200. The user turns the image stabilization on/offswitch on if they want to execute image stabilization at theinterchangeable lens 200 side, and turns the image stabilization on/offswitch off if they do not want to perform image stabilization.

An electronic viewfinder (EVF) 21 is arranged at an upper part of therear surface of the camera body 100. The user can observe a smalldisplay that is arranged within the camera body 100 through an eyepiecewindow of the EVF 21, and live view images etc. are displayed on thisdisplay.

A rear surface monitor 23 is arranged on a rear surface of the camerabody 100. This rear surface monitor 23 has a display such as a liquidcrystal display (LCD) or organic EL. Live view images, already storedimages, menu images etc. are stored on this rear surface monitor 23 andon the previously described EVF 21. Further, horizontal correctionimages at the time of automatic horizontal correction (refer to FIG. 16Ato FIG. 16D) and image trimming and resizing processing images (refer toFIG. 11 and FIG. 12) etc. are also displayed on the rear surface monitor23 and the EVF 21.

A shooting mode dial 25 is arranged on an upper surface of the camerabody 100. This shooting mode dial 25 is freely rotatable, and it ispossible for the user to set a shooting mode by lining up a shootingmode that is displayed on the upper surface of the shooting mode dial 25with an index.

A shutter button 27 is arranged to the right of the shooting mode dial25. If the user presses the shutter button 27 down halfway, a 1strelease switch is turned on, and if the shutter button 27 is furtherpressed fully a 2nd release switch is turned on. If the 1st releaseswitch is turned on, AE (auto exposure) and AF (autofocus) are executed(refer to S9 in FIG. 3, and to FIG. 20). Also, if the 2nd release switchis turned on, actual shooting is performed for image storage of a stillpicture (refer to S13 in FIG. 3, and to FIG. 21). The shutter button 27functions as a shooting instruction interface (shooting instructionsection) for instructing preparation or commencement of shooting.

An F dial 29 f is arranged toward the front on an upper surface of thecamera body 100, and an R dial 29 r is arranged toward the back on theupper surface of the camera body 100. Both dials are rotatable, and theuser can change settings by operating the F dial 29 f and the R dial 29r with their finger (refer, for example, to S223 in FIG. 18, and S241 inFIG. 19).

An enlargement button 31 is also arranged on the right side of the uppersurface of the camera body 100. If the user operates the enlargementbutton 31, an image that is displayed on the rear surface monitor 23 onthe EVF 21 is enlarged. A movie button 33 is arranged close to theenlargement button 31. If the user operates the movie button 33, thenshooting of a movie is commenced, and if the movie button 33 is operatedagain shooting of the movie is finished.

An automatic horizontal correction button 35 is arranged at the upperright of the rear surface of the camera body 100. If the user operatesthe automatic horizontal correction button 35, automatic horizontalcorrection is set (refer to S211 aimed S213 in FIG. 17, and to FIG. 18etc.). Further, if the F dial 29 f or the R dial 29 r are operated in astate where automatic horizontal correction has been set, the automatichorizontal correction mode is changed (refer to S223 in FIG. 18, and toFIG. 19 etc.). If automatic horizontal correction has been set, a takenimage is adjusted so as to be horizontally corrected (refer, forexample, to S63 in FIG. 5A, and to FIG. 11, FIG. 12 etc.). The automatichorizontal correction button 35 functions as an automatic horizontalcorrection interface (horizontal correction instruction section) thatinstructs horizontal correction of the image sensor, or an image of theimage sensor, with respect to an image frame.

An AF button 37 is arranged in the middle on the right side of the rearsurface of the camera body 100. If the user operates the AF button 37 itis possible to perform AF (automatic focus adjustment).

An image stabilization button 39 is arranged to the right of the AFbutton 37. If the user operates the image stabilization button 39 imagestabilization is set (refer to S215, S217, etc. in FIG. 17). If imagestabilization has been set, image stabilization is performed so as toeliminate the effects of camera shake (refer to FIG. 5B).

A cross shaped-button 41 is arranged below the AF button 37 and imagestabilization button 39 described above. The cross-shaped button 41 is abutton that is capable of being respectively operated upwards,downwards, to the left, and to the right. By operating the cross-shapedbutton 41 either upwards, downwards, to the left, or to the right, it ispossible to move a cursor that is displayed on the rear surface monitor23, for example, and it is possible to move items that are beingdisplayed. An OK button 43 is arranged in the center of the cross-shapedbutton 41. When the user moves the cursor etc. by operating thecross-shaped button 41 it is possible to decide on settings for itemsetc. by operating the OK button 43. An INFO button 45 is arranged belowthe cross-shaped button 41. If the user operates the INFO button 45,shooting information etc. is displayed on the rear surface monitor 23.

Next, the electrical structure of the camera of this embodiment willmainly be described using FIG. 2A and FIG. 2B. As was describedpreviously, the camera 1 of this embodiment comprises the camera body100 and the interchangeable lens 200, with the structure of theinterchangeable lens 200 being shown in FIG. 2A, and the structure ofthe camera body 100 being shown in FIG. 2B.

A photographing lens 201 is arranged inside the interchangeable lens200. Only a single optical lens is shown in FIG. 2A, but obviously thephotographing lens 201 may comprise a plurality of optical lenses. Thephotographing lens 201 has, for example, a focus lens for adjusting thefocus, and a zoom lens for adjusting focal length. The focus lens etc.is moved in the optical axis direction of the photographing lens 201 bya lens controller 208. Specifically, the focus lens is moved in theoptical axis direction by the lens controller 208 so as to achievefocus. The lens controller 208 comprises a lens drive mechanism and alens drive circuit, and adjusts focused position of the focus lens basedon control signals from a system control section 130 within the camerabody 100 by means of a communication control section 211 and a lenscommunication section 110.

An aperture 202, ND filter 203, and an image stabilization opticalsystem 204 are arranged on the optical axis of the photographing lens201. The aperture 202 adjusts an amount of light that passes through thephotographing lens 201 by changing the aperture using an aperturecontrol section 207. The aperture control section 207 comprises anaperture drive mechanism and an aperture drive circuit, and adjustsaperture value (aperture) of the aperture 202 based on control signalsfrom the system control section 130 within the camera body 100 by meansof the communication control section 211 and the lens communicationsection 110.

The ND (Neutral Density) filter 203 changes light amount that is passedwithout changing the color of a photographed object. The ND filter 203is inserted into or removed from the optical axis of the photographinglens 201 and ND control section 206. The ND control section 206comprises an ND filter inserting and removing mechanism and an ND filterdrive circuit, and performs insertion and removal of the ND filter 203on the optical axis based on control signals from the system controlsection 130 within the camera body 100, by means of the communicationcontrol section 211 and the lens communication section 110. When subjectbrightness is too bright, the ND filter 203 is inserted on the opticalaxis, while when the subject brightness is dark the ND filter 203 iswithdrawn from the optical axis. As a result of this control is possibleto control incident light amount on the image sensor 105 withoutchanging depth of field. It should be noted that in the case of movieshooting, it is desirable for the ND filter 203 to quickly andcontinuously change concentration silently during shooting, and so anelectronic concentration control device may be adopted, such aselectrochromic elements or liquid crystal.

The image stabilization optical system 204 is moved within a plane thatis orthogonal to the optical axis of a photographing optical system 201by an image stabilization control section 205, to remove the effects ofcamera shake. Specifically, a camera shake detection section 209 detectscamera shake that is applied to the interchangeable lens 200, andtransmits camera shake detection signals to the system control section130 within the camera body 100 by means of the communication controlsection 211 and the lens communication section 110. The system controlsection 130 generates a camera shake control signal for reducing camerashake based on the camera shake detection signal, and this camera shakecontrol signal is transmitted to the image stabilization control section205 by means of the lens communication section 110 and the communicationcontrol section 211. The image stabilization control section 205 has adrive mechanism and drive circuits for driving a shake correctionoptical system, and controls position of the image stabilization opticalsystem 204 based on the camera shake control signal that has beengenerated by the system control section 130. It should be noted thatwithin the camera body 100 also, position of the image sensor 105 iscontrolled by a camera shake detection section 111 and imaging drivecontrol section 109, so as to remove the effects of camera shake.

An operation section 210 detects operating state of the imagestabilization on/off switch provided outside the previously describedinterchangeable lens 200, and the result of this detection istransmitted to the system control section 130 by means of thecommunication control section 211 and the lens communication section110. The system control section 130 executes image stabilization inaccordance with a shake correction mode that has been set using thepreviously described image stabilization on off switch, and imagestabilization button 39. The operation section 210 detects operatingstates of operation members other than the image stabilization button39, such as a zoom ring, and transmits results to the system controlsection 130.

The communication control section 211 comprises a communication circuitand a processor such as a CPU (Central Processing Unit), and performscommunication with the system control section 130 by means of the lenscommunication section 110 within the camera body 100. The communicationcontrol section 211 transmits various information such as aperturevalue, focus position, focal length, camera shake detection value etc.for within the interchangeable lens 200 to the system control section130 within the camera body 100. The communication control section 211also receives control signals from the system control section 130, andtransmits control signals to the image stabilization control section205, ND control section 206, aperture control section 207, and lenscontroller 208 etc.

Inside the camera body 100, an image sensor 105 is arranged on theoptical axis of the photographing lens 201. The image sensor 105comprises a CCD image sensor or a CMOS image sensor etc., and an imagingdrive circuit, and subjects a subject image that has been formed by thephotographing lens 201 to photoelectric conversion and outputs an imagesignal to an A/D conversion section 106.

The image sensor 105 is moved within a plane that is orthogonal to theoptical axis of the photographing lens 201 in the X direction and Ydirection, by the imaging drive control section 109, and is rotatedwithin a plan that is orthogonal about the optical axis. The imagingdrive control section 109 has a drive mechanism (including an actuator)and a drive circuit, for spatially driving the image sensor 105. It ispossible to remove camera shake (image stabilization), and to align abottom line of an image frame of a taken image with a horizontal line(automatic horizontal correction) as a result of this movement in the Xand Y directions, and rotation. In the case of performing automatichorizontal correction, the image sensor 105, or an output image of theimage sensor 105, is rotated about the optical axis of the image sensorby a first angle so as to be corrected horizontally with respect to animage frame (refer, for example, to S73 in FIG. 5A). Also, in the caseof performing image stabilization due to rotational blur, the imagesensor is rotated about the optical axis so as to remove camera shake,based on detection results of a blur detection section 111 (refer, forexample, to S75 in FIG. 5A, and to S99 and S119 in FIG. 5B). Also, afterautomatic horizontal correction has been performed, there are caseswhere an image frame of an output image is blurred with respect to thehorizontal direction due to the effects of camera shake, and so in thiscase also an image sensor drive control section 109 rotates the imagesensor about the optical axis of the photographing lens 201 and performscorrection so that the image frame is kept in a state where it isaligned with the horizontal direction (refer, for example, to S73 andS75 in FIG. 5A).

The imaging drive control section 109 functions as an image sensor driveactuator (image sensor drive section) that rotates the image sensorabout the optical axis, based on detection result from an angular speeddetection section or calculation result from a horizontal anglecalculation section. Also, the imaging drive control section 109functions as an image sensor drive section (actuator) that rotates theimage sensor about the optical axis, when a horizontal correctioninstruction has been issued from a horizontal correction instructionsection (refer, for example, to S73 in FIG. 5A). There are at least tworotational ranges for the image sensor being rotated by the image sensordrive section, being a rotational range for executing horizontalcorrection, and a rotational range for executing camera shake preventionbased on result of detection by an angular speed detection section(refer, for example, to S73 and S75 in FIG. 5A). Rotational ranges forthe image sensor being rotated by the image sensor drive section have atleast two levels of rotational response range, such as a rotationalresponse range for executing horizontal correction and a rotationalresponse range for executing camera shake prevention based on results ofdetection by and angular speed detection section (refer, for example, toS73 and S75 in FIG. 5A).

The image sensor drive section (actuator) 109 comprises an actuator forimage sensor angular rotation (image sensor angular rotation section)that causes rotational drive of the image sensor in a direction aroundthe optical axis so that there is no difference between calculationresult of the horizontal angle calculation section and an angle of theimage sensor at the current point in time (refer, for example, to S73 inFIG. 5A), and an actuator for rotational blur correction (rotationalblur correction section) for correcting rotational blur by rotating theimage sensor in a direction around the optical axis based on output ofthe angular speed detection section (refer, for example, to S75 in FIG.5A, and S99 and S119 in FIG. 5B).

The actuator for image sensor angular rotation (image sensor angularrotation section) causes rotational drive of the image sensor at arotational speed that is slower than the actuator for rotational blurcorrection (rotational blur correction section) (slowly) (refer, forexample, to FIG. 10A to FIG. 10C). The actuator for image sensor angularrotation (image sensor angular rotation section) rotates the imagesensor faster as camera shake amount become smaller (refer, two example,to FIG. 10A to FIG. 10C).

The A/D conversion section 106 has an A/D conversion circuit, andsubjects an image signal that has been output by the image sensor 105 toAD conversion and outputs image data to a memory 108. The memory 108 isa memory such as an SDRAM (Synchronous Dynamic Random Access Memory),and stores image data etc.

The memory 108 is connected to an image processing section 107 and thesystem control section 130. The image processing section 107 has animage processing circuit, and performs various image processing on imagedata that has been stored in the memory 108. As image processing thereare image processing such as exposure correction and noise processing,WB gain correction, edge enhancement, false color correction etc.Further, the image processing section 107 also performs processing(development processing) to convert image data that has been subjectedto the above described image processing to a stored data format etc.Image data that has been subjected to image processing is output to thememory 108, stored once again, or output to the system control section130. Image data that has been output to the system control section 130is output to a display section 120 etc., and output to external memory121. The image processing section 107 also performs electronic imagestabilization processing, trimming processing for image data, resizingprocessing etc. (refer, to S81 and S83 in FIG. 5A, S103 and S105 in FIG.5B, and to FIG. 11 and FIG. 12).

The system control section 130 is a processor having a CPU or the like,and controls each section within the camera body 100, and controls asection within the interchangeable lens 200 by means of the lenscommunication section 110 and the communication control section 211. TheCPU controls each of the sections described above in accordance withprograms stored in nonvolatile memory 122. As well as being connected tothe previously described imaging drive control section 109, lenscommunication section 110, image processing section 107, and memory 108,the system control section 130 is also connected to the camera shakedetection section 111, exposure control section 112, AF processingsection 113, PC communication section 114, wireless communicationsection 115, headphone output section 116, power supply control section118, operation section 119, external memory 121, nonvolatile memory 122,audio speaker output section 123, internal microphone 124, externalmicrophone input section 125, and built-in flash control section 103.

The system control section 130 performs overall control of the camera 1,as described previously. As part of the overall control, control of animage stabilization function and an automatic horizontal correctionfunction are performed (refer, for example, to FIG. 5A and FIG. 5B). Thesystem control section 130 functions as a horizontal angle calculationsection (horizontal angle calculation circuit or processor) that detectsvertical direction or horizontal direction of the imaging device or theimage sensor, and calculates and outputs a first angle around theoptical axis of the image sensor in order to horizontally correct theimage sensor or an output image of the image sensor with respect to animage frame. The system control section 130 also functions as a movementrange restriction section (processor), that, at the time of shootingstandby, when rotating the image sensor, based on detection result fromthe angular speed detection section or calculation result from thehorizontal angle calculation section, restricts a region in which theimage sensor is capable of moving to a first region that includes acentral region of the optical axis, so as to maximize an angular rangein which the image sensor can rotate (refer, for example, to S71 in FIG.5A). Also, the system control section (processor) 130 causes themovement range restriction section to set a region in which the imagesensor is capable of moving to a second region that is wider than at thetime of shooting standby, and includes the first region, based oninstruction of a shooting instruction section (refer, for example, toS261 in FIG. 20, and S281 in FIG. 22A).

The system control section 130 functions as a horizontal anglecalculation section (horizontal angle calculation circuit or processor)that switches between and outputs either of the first angle and thesecond angle based on instruction of a horizontal correction instructionsection (refer, for example, to S67, S73, and S81 in FIG. 5A).

The above described movement range restriction section (processor)relaxes restriction with shooting standby in progress as an amount ofimage stabilization becomes smaller (refer, to S121 and S127 in FIG. 6,and to FIG. 7A). The movement range restriction section (processor)relaxes restriction with shooting standby in progress as shutter speedbecomes faster (refer, for example, to S123 and S127 in FIG. 6, and toFIG. 7B). The movement range restriction section (processor) relaxesrestriction with shooting standby in progress as focal length becomesshorter (refer, for example, to S125 and S127 in FIG. 6, and to FIG.7C). The movement range restriction section (processor) relaxesrestriction with shooting standby in progress after there is no longer adifference between a calculation result from the horizontal anglecalculation section and angle of the image sensor at the current pointin time.

The lens communication section 110 has a communication circuit, and isconnected to the communication control section 211 within theinterchangeable lens 200. The lens communication section 110 transmitscontrol signals from the system control section 130 to the communicationcontrol section 211, and receives signals from the communication controlsection 211 before outputting them to the system control section 130.

The camera shake detection section 111 has camera shake sensors (angularspeed sensors and acceleration sensors etc.) that can detect angularspeed (Yaw, Pitch, Roll) and acceleration (X, Y, Z) that have beenapplied to the camera, and a detection circuit that detects output ofthese camera shake detection sensors. The camera shake detection section111 outputs camera shake detection signals to the system control section130, and the system control section 130 outputs control signals fordriving the image sensor 105 in a direction to counteract Yaw, Pitch,Roll, X, and Y camera shake movement to the imaging drive controlsection 109 based on the camera shake detection signals. The camerashake detection section 111 functions as an angular speed detectionsensor (angular speed detection section or camera shake detectionsensor) for detecting angular speed of the imaging device. The camerashake detection section 111 also has a function not only to detect shiftamount due to horizontal movement of the camera and angular blur due toangular change of the camera, but also to detect gravitationalacceleration, detect vertical direction or horizontal direction of thecamera, and output detection results using a spirit level.

Also, the camera shake detection section 111 detects angular speed in aRoll direction of the camera, and when performing rotational blurcorrection (refer, for example, to S75 in FIG. 5A and S99 and S119 inFIG. 5B) performs signal output using filter processing having fasterresponsiveness than automatic horizontal correction (refer to FIG. 10A,FIG. 10B, and FIG. 100), and performs correction based on the signaloutput. On the other hand, when performing automatic horizontalcorrection by detecting gravitational acceleration and then detectingvertical direction or horizontal direction of the camera (refer to S73and S81 in FIG. 5A) the camera shake detection section 111 performssignal output with filter processing of slow responsiveness (refer toFIG. 10A, FIG. 10B, and FIG. 10C), that is different from theresponsiveness for detecting rotational blur, in order not to reactsensitively to noise components caused by camera shake. In this way, thecamera shake detection section 111 has a function to switchresponsiveness of detection or rotational control for the purpose ofrotational blur correction and automatic horizontal correction.Responsiveness of signal output of the camera shake detection section111 is controlled using control signals output by the system controlsection 130, but it is also possible to use a gravitational accelerationsensor that has slower responsiveness than a camera shake sensor insteadof filter processing.

The exposure control section 112 calculates subject brightness based onimage data that has been acquired by the image sensor 105, andcalculates exposure control values such as aperture value, electronicshutter speed value, ISO sensitivity value etc. to achieve appropriateexposure based on this subject brightness. Then, based on the exposurecontrol values that have been calculated, control of aperture,electronic shutter, and ISO sensitivity are performed by means of thesystem control section 130. Also, at the time of controlling to correctexposure, insertion or removal of the ND filter 203 into or from theoptical path is also performed. Further, in a case where the camera hasa mechanical shutter, control may also be performed using shutter speedto achieve appropriate exposure.

The AF processing section 113 extracts a so-called contrast signal basedon image data that has been acquired by the image sensor 105, andcontrols the focus lens so that this contrast signal becomes a peak. Itshould be noted that in a case where a sensor for phase difference AF bis provided on an imaging plane of the image sensor 105, the AFprocessing section 113 may calculate defocus amount of the focus lens,and control the focus lens based on this defocus amount.

A PC (personal computer) communication section 114 has terminals such asa USB terminal, and a communication circuit, and performs communicationwith a PC that is external to the camera 1. For example, image data thathas been stored in memory such as the external memory 121 or memory 108may be output to the external PC by means of the PC communicationsection 114 and conversely image data may be input from the external PC.

The wireless communication section 115 has a wireless communicationcircuit for performing wireless communications such as Wi-Fi, andperforms wireless communication etc. with external devices. For example,image data that has been stored in memory such as the external memory121 or memory 108 may be output to the external PC by means of thewireless communication section 115, and conversely image data may beinput from the external PC.

The headphone output section 116 has a headphone output circuit and anoutput terminal, and outputs an audio signal externally based on audiodata that has been stored together with image data. An externalmicrophone 125 has an input terminal for input of an audio signal and/oraudio data from an external microphone, and a signal (data) processingcircuit, and is input with an audio signal (audio data) from theexternal microphone.

The internal microphone 124 has a microphone for audio signalgeneration, and an audio signal processing circuit etc. The internalmicrophone 124 is provided for the purpose of also additionally storingaudio at the time of movie storage. The audio speaker output section 123has an audio data processing circuit and a speaker. This speaker playsback audio data that has been stored together with image data.

The nonvolatile memory 122 is memory such as an electrically rewritableflash ROM, and stores various adjustment values for the camera body 100,and programs to operate the CPU within the system control section 130.As various adjustment values, for example, a second angle (refer to FIG.9) representing an installation error of the image sensor 105 is stored.The nonvolatile memory 122 (or memory within the system control section130) functions as a reference angle memory (reference handle storagesection) that stores a second angle indicating a reference angle aboutthe optical axis of the image sensor (refer, for example, to S67 in FIG.5A, and to FIG. 9).

The external memory 121 is an electrically rewritable nonvolatile memorythat can be inserted into and taken out of the camera body 100. Imagedata that has been acquired by the image sensor 105 and subjected toimage processing for storage is stored in the external memory 121.

The display section 120 has monitors of the previously described EVF 21and rear surface monitor 23, and a display control circuit. The displaysection 120 displays live view images, playback images of stored images,and menu images etc. The display section 120 (rear surface monitor 23 orEVF 21) functions as a display (display section) for live view display.This display (display section) is capable of automatic horizontalcorrection valid display, indicating that there is a state whereautomatic horizontal correction has been performed (refer, for example,to S207 in FIG. 15B and F8 in FIG. 16D etc.), and automatic horizontalcorrection invalid display indicating that the live view being displayis not in a state of having been subjected to automatic horizontalcorrection (refer, for example, to S205 in FIG. 15B and F7 and F8 inFIG. 16D). Also, this display (display section) is made capable ofdisplaying an inclination amount display representing inclination amountof the imaging device (refer, for example, to Roll inclination display120 g in FIG. 16D) and a range display representing a range ofinclination for which automatic horizontal correction is possible(refer, for example, to 120 k in FIG. 16D).

The operation section 119 comprises various operation members such asthe previously described shooting mode dial 25, shutter button 27, Fdial 29 f, R dial 29 r, automatic horizontal correction button 35 andimage stabilization button 37, and an operating state detection circuit,and detects operating states of these operation members and outputsdetection results to the system control section 130. It should be notedthat a touch panel may be provided on the rear surface monitor 23, withtouch operations by the user on this search panel being detected andoutput to the system control section 130. Also, although notillustrated, the operation section 119 also has a power supply switchfor turning a power supply on. The shutter button 27 and/or the AFbutton 37 within the operation section 119 function as a shootinginstruction interface (shooting instruction section) for instructingpreparation or commencement of shooting.

A power supply 117 has a power supply battery etc., and the power supplycontrol section 118 controls supply of electrical power to the camerabody 100 and the interchangeable lens 200 by adjusting voltage of thepower supply 117.

A flash firing section 101 has a firing section such as a xenon tube,and irradiates flash light to a subject using power from a flashcharging section 102. The flash charging section 102 boosts power supplyvoltage of the power supply 117 and charges the boosted voltage into acapacitor. The built-in flash control section 103 performs control ofemission timing and light emission time in response to control signalsfrom the system control section 130. An external flash communicationcontrol section 104 has a communication circuit (or communicationterminal section), and outputs signals relating to emission timing andlight emission time to an external flash unit that has been fitted tothe camera body 100. It should be noted that the external flash unit mayalso be controlled by the camera body 100 using wireless communication.

Next, main operation of this embodiment will be described using theflowchart shown in FIG. 3. This flowchart (the same also applies to FIG.4 to FIG. 6, FIG. 8A, FIG. 8B, FIG. 13 to FIG. 15B, and FIG. 17 to FIG.24) is executed by the system control section 130 within the camera body100 controlling each section within the camera body 100 and theinterchangeable lens 200.

If the power supply switch is turned on and the main flow shown in FIG.3 is commenced, first, lens information acquisition processing isexecuted (S1). Here, the system control section 130 performscommunication between the camera body 100 and the interchangeable lens200 by means of lens mount pins that are provided in the interchangeablelens 200, and acquires lens information of the interchangeable lens 200.Also, among the lens information, as image stabilization associatedinformation the system control section 130 acquires information such as

-   -   whether or not a lens that is attached is an image stabilization        lens,    -   whether or not an image stabilization method is “lens and body        collaborative image stabilization”,    -   whether or not there is an “image stabilization switch” at the        lens side,    -   whether a lens side “image stabilization switch” is on or off,        and    -   “number of image stabilization steps (image stabilization        capability)” for every focal length at the lens side.

It should be noted that lens and body collaborative image stabilizationis performing image stabilization collaboratively in both the camerabody 100 and the interchangeable lens 200. Specifically, lens and bodycollaborative image stabilization is a method of moving both an imagestabilization correction optical system 204 within the interchangeablelens 200, and the image sensor 105 within the camera body 100 indirections that eliminate camera shake. This means that if lens and bodycollaborative image stabilization is set, image stabilization capabilityin Yaw and Pitch directions becomes at least better than the imagestabilization capability of only a lens, or only a camera. Detailedoperation of the lens information acquisition processing will bedescribed later using FIG. 4.

Once lens information has been acquired, next, live view displayprocessing is performed (S3). Here, the system control section 130acquires image data from the image sensor 105, this image data issubjected to image processing for live view display by the imageprocessing section 107, and a live view image is displayed on the rearsurface monitor 23 or the EVF 21 of the display section 120. This liveview display is updated every time according to frame rate. Also, in acase where the automatic horizontal correction button 35 within theoperation section 119 is operated and automatic horizontal correction isturned on (refer to step S7, and to S211 in FIG. 17), “live view displayfor automatic horizontal correction” is displayed (refer, for example,to FIG. 11 to FIG. 14, FIG. 16C, and FIG. 16D). Detailed operation ofthe live view display processing will be described later using FIG. 5Aand FIG. 5B.

If live view display processing is performed, it is next determinedwhether or not there has been operation using the operation members(S5). Here, the system control section 130 determines whether or not anyof various operation members within the operation section 119, forexample, various operation members such as the shooting mode dial 25,shutter button 27, F dial 29 f, R dial 29 r, automatic horizontalcorrection button 35, and image stabilization button 37, have beenoperated.

If the result of determination in step S5 is that an operation memberother than the shutter button has been operated, operation memberprocessing is executed (S7). Here, processing corresponding to theoperation member that has been operated is executed. For example, in acase where the shooting mode dial 25 has been operated, settingprocessing for a shooting mode that has been designated by the user isperformed. Also, setting of an automatic horizontal correction flagAHC_Flg is performed in response to operation of the automatichorizontal correction button 35, and setting of an blur stabilizationflag BSC_Flg is performed in response to operation of the imagestabilization button 37. Detailed operation of this operation memberprocessing will be described later using FIG. 17.

On the other hand, if the result of determination in step S5 is that theshutter button has been operated, 1st ON processing is executed (S9). Ifthe shutter button is pressed down halfway, specifically, if the 1strelease switch is turned on, the system control section 130 executes 1stON processing. As 1st ON processing, for example, AF processing toperform focusing of the focus lens within the photographing lens 201,and calculation of exposure control values such as aperture value andshutter speed to attain appropriate exposure, are performed. Detailedoperation of this 1st ON processing will be described later using FIG.20.

Once 1st ON processing has been performed, it is next determined whetheror not the 2nd release switch is on (S11). Once the user has determinedcomposition, they press the shutter button 27 down fully in order toshoot a still picture. In this step, the system control section 130determines whether or not the shutter button has been pressed down fullyand the 2nd release switch has been turned on based on a detectionsignal from the operation section 119. If the result of thisdetermination is that the 2nd release switch is off, step S1 is returnedto.

On the other hand, if the result of determination in step S11 is thatthe 2nd release switch is on, still picture shooting processing isexecuted (S13). Here, the system control section 130 performs actualexposure in accordance with exposure control values for shooting at theappropriate exposure, that were calculated at the time of 1st ONprocessing. Once the exposure time has elapsed, the system controlsection 130 reads out image data from the image sensor 105. Detailedoperation of the still picture shooting processing will be describedlater using FIG. 21.

Once still picture shooting processing is complete, next, imageprocessing is performed (S15). Here, the image processing section 107applies image processing for storage to image data that has been readout from the image sensor 105. In a case where the automatic horizontalcorrection button 35 has been operated and automatic horizontalcorrection has been set, image processing for automatic horizontalcorrection is further applied, depending on automatic horizontalcorrection mode. Detailed operation of the image processing will bedescribed later using FIG. 23.

Once image processing has been performed, next, storage processing isexecuted (S17). Here, the system control section 130 stores image datathat has been subjected to image processing by the image processingsection 107 in the external memory 121.

Once storage has been performed, it is next determined whether or notthe power supply is off (S19). Here, the system control section 130determines whether or not the power supply switch within the operationsection 119 has been turned off. If the result of this determination isthat the power supply switch is on, step S1 is returned to.

On the other hand, if the result of determination in step S19 is thatthe power supply is off, power supply off processing is executed (S21).Here, the system control section 130 executed processing for powersupply off, and the power supply is placed in an off state. Once thepower supply off processing has been executed, the flow for mainoperation shown in FIG. 3 is terminated.

Next, detailed operation of the lens information acquisition processingof step S1 (refer to FIG. 3) will be described using the flowchart shownin FIG. 4.

If the flow for lens information acquisition processing is commenced,first, lens communication is performed (S31). Here, the system controlsection 130 commences communication between the camera body 100 and theinterchangeable lens 200 by means of the lens communication section 110and lens mount pins.

If lens communication has been commenced in step S31, lens basicinformation is next acquired (S33). Here, the system control section 130acquires basic information of the lens using communication between thecamera body 100 and the interchangeable lens 200. As basic informationthere are, for example, lens product name, lens serial No., lens FNo.(from minimum value to maximum value), minimum shooting distance,nominal focal length, lens color temperature, and lens feed pulse amountfrom the infinity end to the close-up end. etc.

Once lens basic information has been acquired, next, lens side imagestabilization information is acquired (S35). Here, the system controlsection 130 further acquires information relating to image stabilizationof the interchangeable lens 200 using lens communication. As this lensside image stabilization information, the interchangeable lens 200acquires information relating to

-   -   whether there is an image stabilization function,    -   whether there is an image stabilization on/off switch, and    -   whether there is a BLC image stabilization function.

Here, the BLC image stabilization function is a function for performingan image stabilization operation where there is collaboration betweenlens side image stabilization and body side image stabilization, thathas a larger correction effect than either on its own.

With the example that was shown in FIG. 1 and FIG. 2A, theinterchangeable lens 200 is provided with an image stabilizationcorrection optical system 204, camera shake detection section 209, andimage stabilization on/off switch. However, as an interchangeable lensthat is fitted to the camera body 100 there may be cases where the lensdoes not have an image stabilization function, and there may be caseswhere the lens does not have an image stabilization on/off switch evenif it does have an image stabilization function. In step S35, therefore,information relating to whether there is an image stabilization functionis acquired by the system control section 130.

Once the lens side image stabilization information has been acquired, itis next determined whether or not an image stabilization lens isattached (S37). Here, based on the lens side image stabilizationinformation that was acquired in step S35, determination is performed asto whether the interchangeable lens that is attached is a “non-imagestabilization lens” that is not provided with an image stabilizationfunction, or if the interchangeable lens is an “image stabilization lens(without collaborative operation)”, which is an image stabilization lensthat is not provided with a collaborative operation function, or if theinterchangeable lens is an “image stabilization lens (with collaborativefunction)”, which is an image stabilization lens that is provided with acollaborative operation function.

If the result of determination in step S37 is that the interchangeablelens that is attached is not an image stabilization lens, specificallyin the case of a non-image stabilization lens, “0” is set as an imagestabilization lens flag SCL_Flg (S39). Also, in a case where theinterchangeable lens that has been attached is an image stabilizationlens without collaborative operation, “1” is set as the imagestabilization lens flag SCL_Flg (S41). Also, in a case where theinterchangeable lens that has been attached is an image stabilizationlens with collaborative operation, “2” is set as the image stabilizationlens flag SCL_Flg (S43).

If the image stabilization lens flag SCL_Flg has been set in steps S39to S43, it is next determined whether or not there is a lens side imagestabilization button (S45). It should be noted that the lens side imagestabilization button means the previously described image stabilizationon/off switch. In many cases where there is a lens side imagestabilization button, there is a status switch such as a slide switch.In this step S45, it is determined whether or not the interchangeablelens 200 that has been attached is provided with an image stabilizationbutton based on the lens side image stabilization information that wasacquired in step S35.

If the result of determination in step S45 is that an imagestabilization button is not provided, “0” is set as a lens side imagestabilization button flag SCLB_Flg (S47). On the other hand, if an imagestabilization button is provided, “1” is set as a lens side imagestabilization button flag SCLB_Flg (S49).

If the lens side image stabilization button flag SCLB_Flg has been setin step S47 or S49, it is next determined whether or not lens side imagestabilization is on (S51). Here, determination as to whether the imagestabilization button of the interchangeable lens that is attached hasbeen turned on or has been turned off is based on the lens side imagestabilization information that was acquired in step S35.

If the result of determination in step S51 is that an imagestabilization button is not on, specifically, if the image stabilizationbutton is off, “0” is set as a lens side image stabilization flagLSC_Flg (S53). On the other hand, if the image stabilization button ison, then “1” is set as the lens side image stabilization flag LSC_Flg(S55). Once the lens side image stabilization flag LSC_Flg has been setin step S53 or S55, the originating flow is returned to.

Next, detailed operations of the live view display processing in step S3(refer to FIG. 3) will be described using the flowcharts shown in FIG.5A and FIG. 5B.

If the flow for live view display processing is commenced, first of allthe automatic horizontal correction flag AHC_Flg is judged (S61). As wasdescribed previously, the automatic horizontal correction button 35 isarranged on the camera body 100. If the automatic horizontal correctionbutton 35 is press down then automatic horizontal correction is turnedon, and if the automatic horizontal correction button 35 is pressed downagain automatic horizontal correction is turned off. The system controlsection 130 sets “1” in the automatic horizontal correction flag AHC_Flgif automatic horizontal correction is on, and sets “0” in the automatichorizontal correction flag AHC_Flg if automatic horizontal correction isoff (refer to S211 and S213 in FIG. 17, and to S227 to S231 in FIG. 18).In this step, determination is based on the set value of this automatichorizontal correction flag AHC_Flg.

If the result of determination in step S61 is that the automatichorizontal correction flag AHC_Flg=0, specifically that the automatichorizontal correction button 35 is off, central portion restriction ofthe movement range of the image sensor is released (S65). As will bedescribed later, when automatic horizontal correction is set, movementrange of the image sensor is restricted to a central portion (refer toS71 etc.). However, since the result of determination in step S61 isthat automatic horizontal correction will not be performed, in a casewhere movement range of the image sensor has been restricted to acentral portion, this restriction is released.

Next, the image sensor is subjected to rotation processing to a secondangle (S67). The image sensor 105 is positioned so that the bottom ofthe frame of a taken image that has been acquired by the image sensor105 becomes parallel to the bottom of the camera body 100. However, whenthe image sensor 105 is actually fitted at the factory, slight errorwill arise. This attachment error is measured at the time of factoryshipment, and stored in the nonvolatile memory 122 as a second angle(refer to FIG. 9). In this step, the system control section 130 readsout the second angle from the nonvolatile memory 122, and the imagingdrive control section 109 rotationally drives the image sensor 105 so asto be aligned with the second angle. As a result of this rotationaldrive, the bottom of the frame of a shooting screen is substantiallyaligned with a bottom surface of the camera body 100 (tripod attachmentsurface B (refer to FIG. 9)).

Once rotational processing so that the image sensor reaches the secondangle has been performed, next, normal live view display is performed(S69). Here, the system control section 130 reads out image data fromthe image sensor 105, and displays a live view image on the displaysection 120 (EVF 21 or rear surface monitor 23) based on this image datathat has been subjected to image processing for live view by the imageprocessing section 107.

Returning to step S61, if the result of determination in this step isthat the automatic horizontal correction flag AHC_Flg=1, namely that theautomatic horizontal correction button 35 is on, and that automatichorizontal correction processing will be performed, next the type ofautomatic horizontal correction mode is determined (S63). With thisembodiment, three automatic leveling modes are provided, namely mode1-1, mode 1-2, and mode 2, and either mode is set using a menu screendisplayed on the display section 120.

Automatic horizontal correction modes mode 1-1 and mode 1-2 are modes inwhich horizontal correction is performed by the imaging drive controlsection 109 mechanically rotating the image sensor 105. However, in mode1-2, in a case where the interchangeable lens that is attached does nothave an image stabilization correction optical system 204, electronicimage stabilization is performed during live view display. Also, in theautomatic horizontal correction mode of mode 2, the image sensor 105 isnot mechanically rotated, and automatic horizontal correction isperformed by rotating image data using image processing.

Specifically, in mode 1-1 and mode 1-2 automatic horizontal correctionis realized by mechanically rotating the image sensor 105. It istherefore desirable for the rotational center of the image sensor 105 tobe close to the optical axis of the photographing lens 201. As a resultof this, movement range is restricted when performing imagestabilization by moving the image sensor, and there is a risk of notobtaining a sufficient image stabilization effect for live view.Therefore, at the time of image stabilization (and in a case where theinterchangeable lens does not have an image stabilization opticalsystem), mode 1-2 performs electronic image stabilization. Ina casewhere mode 1-2 is set, if electronic image stabilization is performed alive view image is cut out from within image data (trimming processing),and so the shooting angle of view is narrowed. Similarly, in a casewhere mode 2 is set, a live view image is cut out from within image data(trimming processing), and so the shooting angle of view is narrowed(refer to FIG. 11 and FIG. 12). This means that although this embodimentis configured so that it is possible for the photographer tointentionally select mode 1-2 or mode 2, it may also be configured sothat the modes are automatically switched in accordance with live viewconditions at the time of shooting standby. In particular, automaticallyswitching mode is preferable with a large telephoto system with whichthe effects of camera shake are more significant.

If the result of determination in step S63 is mode 1-1 or mode 1-2, thenmovement range of the image sensor is restricted to a central portion(S71). In the event that the mode has been sent to either of mode 1-1 ormode 1-2, then as was described previously automatic horizontalcorrection is implemented by rotating the image sensor 105. Rotation ofthe image sensor 105 is performed by rotating close to a central portionof the image sensor 105, and so this movement range is restricted to acentral portion. This is because if the movement range is not restrictedto the central portion, in the event that the image sensor 105 moves alot as a result of blur correction, automatic horizontal correction willno longer be possible by rotating the image sensor 105.

It should be noted that as a way of restricting movement range of theimage sensor 105 to a central portion, restriction may be to a point ofa central portion, or to an extremely narrow range. Also, in the case ofrestriction of movement range to a central portion, movement range maybe changed in accordance with shooting conditions (for example, camerashake amount, shutter speed, focal length etc.). This change will bedescribed later using FIG. 7A to FIG. 7C. Detailed operation of step S71will be described later using FIG. 6.

If the movement range of the image sensor has been restricted to acentral portion, the image sensor is subjected to rotation processing toa first angle (S73). Here, the image sensor drive control section 109subjects the image sensor 105 to rotation processing at the first angle.However, the first angle is not an angle itself based on a detectedvalue from the camera shake detection section 111, and instead is anangle that is based on an average value of camera shake detection valuesover a predetermined time is used. Specifically, with automatichorizontal correction of mode 1-1 and Mode 1-2 the image sensor 105 issubjected to rotation processing so that the bottom of an image frame ofa taken image is substantially aligned with a horizontal line, with thisrotation processing being performed at a rotation speed that is slowerthan rotational blur correction, which will be described later.Calculation of the first angle will be described later using FIG. 8A andFIG. 8B, and response characteristics for change in first angle, secondangle and rotational blur correction rotational speed will be describedlater using FIG. 10A to FIG. 10C. As a result of this processing, afirst angle with high accuracy and stability is realized by removing theeffects of noise due to camera shake, and by further removing finerotational blur an image can be obtained in which the bottom of an imageframe of a live view image is aligned with a horizontal line.

Returning to step S63, if the result of determination in this step ismode 2, then similarly to step S65, if movement range of the imagesensor has been restricted to a central portion this restriction isreleased (S79). As was described previously, in a case where automatichorizontal correction mode has been set, if the automatic horizontalcorrection is performed by rotating the image sensor, movement range ofthe image sensor is restricted to a central portion (refer to S71 etc.).However, in the case of mode 2, automatic horizontal correction is notby rotation of the image sensor and is performed by rotation processingwith specific trimming and resizing processing of image data, and so itis not necessary to restrict the image sensor to a central portion.Therefore, in a case where the movement range of the image sensor hasbeen restricted to a central portion, this restriction is released.

Next, rotation processing of output image data of the image sensor isperformed based on the first angle (S81). Here, similarly to step S73,the system control section 130 calculates the first angle based on anaverage value for a predetermined time, based on output of the camerashake detection section 111 (refer to FIG. 8A to FIG. 8B, and to FIG.10A to FIG. 100). If the first angle has been calculated, next the imageprocessing section 107 performs rotation processing on image data fromthe image sensor 105 for live view display, based on the first angle. Itshould be noted that response characteristic of the first angle in stepS81 will be described later using FIG. 10A to FIG. 10C.

If rotational processing has been performed in step S81, next, imagedata trimming and resizing processing is performed (S83). If rotationprocessing is performed in step S81, a physical object within the liveview image becomes horizontal, but an image frame of the live view imageis inclined with respect to a horizontal line. Cutting out of an image(trimming) is therefore performed so that the image frame of the liveview image becomes parallel to the horizontal line, and further,resizing processing is performed so that the size of the image becomesthe size of the live view image. Detailed processing of this trimmingand resizing processing will be described later using FIG. 11.

If rotation processing to the first angle has been performed in stepS73, or if trimming and resizing processing of image data has beenperformed in step S83, next, body side rotation blur correction isperformed (S75). As a result of the processing in step S73 and steps S81and S83, an image frame of a taken image becomes parallel to ahorizontal line. However, the camera 1 is subject to camera shake by theuser, and as a result the image frame of a taken image is slightlyoffset with respect to the horizontal line. Therefore, after havingperformed automatic horizontal correction, body side rotational blurcorrection is performed. In this step, rotational offset amount, withinthe camera shake amount that has been detected by the camera shakedetection section 111, is corrected. Specifically, the imaging drivecontrol section 109 rotationally drives the image sensor 105 so thatrotational lower amount that has been detected by the camera shakedetection section 111 is counteracted. In the event that “automatichorizontal correction” is on (namely that the automatic horizontalcorrection flag AHC_Flg=1), rotational blur correction is performed soas to maintain the first angle or the second angle, even if imagestabilization is off.

In steps S67, S73, S75, S81, and S83, drive speed for setting the firstangle or the second angle is slower than a body side rotational blurcorrection (Roll) speed. Acceleration caused by camera shake is added tothe first angle or the second angle obtained from direction ofgravitational acceleration. In order to remove this error due toacceleration, acceleration caused by camera shake is integratedlyaveraged over an appropriate time, so that there is no response to thecamera shake frequency when using this integrated average value (referto S153 to S163 in FIG. 8B). Conversely, camera shake frequencycomponents are corrected by image stabilization.

If body side rotational blur has been corrected in step S75, next,automatic horizontal correction GUI display processing is performed(S77). In the case of performing automatic horizontal correction(automatic horizontal correction flag AHC_Flg=1 in S61), display that isdifferent from normal is performed superimposed on live view display sothat it will be understood that automatic horizontal correction is beingperformed. Detailed operation of this automatic leveling GUI displaywill be described later using FIG. 13 and FIG. 14.

If normal live view display processing has been performed in step S69,or if automatic horizontal correction GUI display processing has beenperformed in step S77, next the blur stabilization flag BSC_Flg isjudged (S91). As was described previously the image stabilization button39 is arranged on the camera body 100, and a setting value for the blurstabilization flag BSC_Flg is inverted each time the user operates theimage stabilization button 39. Here, in the case of performing imagestabilization the blur stabilization flag BSC_Flg=1, while in the caseof not performing image stabilization the blur stabilization flagBSC_Flg=0. If the result of this determination is that imagestabilization is off, namely that the blur stabilization flag BSC_Flg=0,the live view display processing shown in FIG. 5A and FIG. 5B isterminated, and the originating flow is returned to.

On the other hand, if the result of determination in step S91 is thatimage stabilization is on, namely that the blur stabilization flagBSC_Flg=1, next the image stabilization lens flag SCL_Flg is judged(S93). In steps S37 to S43 of FIG. 4, the image stabilization lens flagSCL_Flg relating to image stabilization function of the interchangeablelens that is fitted to the camera body 100 is set. Specifically, in thecase of a non-image stabilization lens the SCL_Flg=0, in the case of animage stabilization lens (without collaborative operation) theSCL_Flg=1, and in the case of an image stabilization lens (withcollaborative operation) the SCL_Flg=2.

If the result of determination in step S93 is that the imagestabilization lens flag SCL_Flg=0, specifically that a non-imagestabilization lens is attached, then in step S95 and after imagestabilization is performed at the camera body 100 side. Specificallysince blur correction cannot be performed in the interchangeable lens200, the imaging drive control section 109 within the camera body 100drives the image sensor 105 so as to remove camera shake.

First, body side angular blur correction is performed (S95). Here, theimaging drive control section 109 drives the image sensor 105 so thatcamera shake in an angular direction (Yaw, Pitch) that has been detectedby the camera shake detection section 111 is counteracted. However,since the image sensor 105 only moves within a plane that is orthogonalto the optical axis of the photographing lens 201, angular directionblur amount is converted to shift blur amount within a plane orthogonalto the optical axis of the photographing lens 201, after which drive isbased on this converted amount.

Next, body side shift blur correction is performed (S97). Here, theimaging drive control section 109 drives the image sensor 105 so thatcamera shake in a shift direction (X, Y) that has been detected by thecamera shake detection section 111 is counteracted. Specifically, theimage sensor 105 is moved within a plane that is orthogonal to theoptical axis of the photographing lens 201.

Next, body side rotational blur correction is performed (S99). Here, theimaging drive control section 109 rotationally drives the image sensor105 so that camera shake in a rotational direction (Roll) that has beendetected by the camera shake detection section 111 is counteracted.Specifically, the image sensor 105 is rotated about the optical axis ofthe photographing lens 201. It should be noted that in the case whereautomatic horizontal correction is on, then since body side rotationalblur correction is performed in step S75, the processing here may beomitted.

If image stabilization has been performed within the camera body 100 insteps S95 to S99, next the automatic horizontal correction mode isdetermined (S101). As was described in step S63, with this embodimentthree automatic horizontal correction modes, namely mode 1-1, mode 1-2,and mode 2, are provided. Of these modes, with mode 1-1 and mode 1-2automatic horizontal correction is performed by mechanically rotatingthe image sensor 105, which means that movement range of imagestabilization is narrowed, and there is a risk that sufficient imagestabilization will not be possible. Therefore, in mode 1-2, in a casewhere the interchangeable lens that is attached does not have an imagestabilization correction optical system 204, electronic imagestabilization is performed during live view display, so that sufficientimage stabilization is performed. In this step, it is determined whetherthe mode that has been set is mode 1-2, or is another mode. If theresult of this determination is that the automatic horizontal correctionmode is mode 1-1 or mode 2, then the flow for live view displayprocessing shown in FIG. 5A and FIG. 5B is terminated, and theoriginating flow is returned to.

On the other hand, if the result of determination in step S101 is thatthe mode is mode 1-2, electronic image stabilization is performed(S103). Electronic image stabilization involves generating image datathat has had camera shake removed, based on a camera shake amount thathas been detected by the camera shake detection section 111.Specifically, in a case where there is angular blur (Yaw, Pitch), imageprocessing is applied so as to remove this angular blur.

Once electronic image stabilization has been performed, trimming andresizing processing of image data is performed (S105). Here, in order toachieve an image for the range of a fixed image frame, an image of thatrange is trimmed from within image data, and resizing processing isperformed to expand this trimmed image to the size of the image frame.Detailed processing of this trimming and resizing processing will bedescribed later using FIG. 12. If trimming and resizing processing ofthe image data has been performed, the flow for live view displayprocessing shown in FIG. 5A and FIG. 5B is terminated and theoriginating flow is returned to.

Returning to step S93, if the result of determination in this step isthat the image stabilization lens flag SCL_Flg=1, specifically that animage stabilization lens without collaborative operation is attached,then in steps S107 and S109 blur correction is performed inside theinterchangeable lens 200. In this case, although the blur correctionoptical system 204 is provided inside the interchangeable lens, it isnot possible to perform collaborative operation with the blur correctionoperation within the camera body 100. Angular blur correction and shiftblur correction are therefore executed inside the interchangeable lens200.

First, lens side angular blur correction is performed (S107). Here, theimage stabilization control section 205 drives the blur correctionoptical system 204 so that a camera shake amount in an angular direction(Yaw, Pitch) that has been detected by the camera shake detectionsection 209 within the interchangeable lens 200 is counteracted.However, since the blur correction optical system 204 only moves withina plane that is orthogonal to the optical axis of the photographing lens201, angular direction blur amount is converted to shift blur amountwithin a plane orthogonal to the optical axis of the photographing lens201, after which drive is based on this converted amount.

Next, lens side shift blur correction is performed (S109). Here, theimage stabilization control section 205 drives the blur correctionoptical system 204 so that camera shake in a shift direction (X, Y) thathas been detected by the camera shake detection section 209 iscounteracted. Specifically, the blur correction optical system 204 ismoved within a plane that is orthogonal to the optical axis of thephotographing lens 201. It should be noted that, similarly to step S99,body side rotational blur correction (Roll) may also be performed. Iflens side shift blur correction is performed, then the flow for liveview display processing shown in FIG. 5A and FIG. 5B is terminated, andthe originating flow is returned to.

Returning to step S93, if the result of determination in this step isthat the image stabilization lens flag SCL_Flg=2, specifically that animage stabilization lens with collaborative operation is attached to thecamera body 100, then in steps S111 and S119 blur correction isperformed using collaboration between the camera body 100 and theinterchangeable lens 200. In this case, the blur correction opticalsystem 204 that has been provided within the interchangeable lens 200can perform collaborative operation with a blur correction operationwithin the camera body 100. The blur amount that has been detected istherefore distributed to the interchangeable lens 200 and the camerabody 100, and blur correction is performed by the respective blurcorrection sections (imaging drive control section 109 and imagestabilization control section 205) collaborating.

First, lens side angular blur correction is performed (S111). Here, theimage stabilization control section 205 drives the blur correctionoptical system 204 so that a camera shake amount in an angular direction(Yaw, Pitch) that has been detected by the camera shake detectionsection 209 within the interchangeable lens 200, or the body side camerashake detection section 111, is counteracted. However, since the blurcorrection optical system 204 only moves within a plane that isorthogonal to the optical axis of the photographing lens 201, angulardirection blur amount is converted to shift blur amount within a planeorthogonal to the optical axis of the photographing lens 201, and theblur correction optical system 204 is driven.

Next, lens side shift blur correction is performed (S113). Here,similarly to step S109, the image stabilization control section 205drives the blur correction optical system 204 so that camera shake in ashift direction (X, Y) that has been detected by the camera shakedetection section 209 or camera shake detection section 111 iscounteracted. Specifically, the blur correction optical system 204 ismoved within a plane that is orthogonal to the optical axis of thephotographing lens 201.

Next, body side angular blur correction is performed (S115). Here,similarly to step S95, the imaging drive control section 109 drives theimage sensor 105 so that camera shake in an angular direction (Yaw,Pitch) that has been detected by the camera shake detection section 209or the camera shake detection section 111 is counteracted. However,since the image sensor 105 only moves within a plane that is orthogonalto the optical axis of the photographing lens 201, angular directionblur amount is converted to shift blur amount within a plane orthogonalto the optical axis of the photographing lens 201, and the image sensor105 is driven.

Next, body side shift blur correction is performed (S117). Here,similarly to step S97, the imaging drive control section 109 drives theimage sensor 105 so that camera shake in a shift direction (X, Y) thathas been detected by the camera shake detection section 209 or camerashake detection section 111 is counteracted. Specifically, the imagesensor 105 is moved within a plane that is orthogonal to the opticalaxis of the photographing lens 201.

Next, body side rotational blur correction is performed (S119). Here,similarly to step S99, the imaging drive control section 109rotationally drives the image sensor 105 so that camera shake in arotational direction (Roll) that has been detected by the camera shakedetection section 111 is counteracted. Specifically, the image sensor105 is rotated about the optical axis of the photographing lens 201. Ifbody side rotational blur correction is performed, then the flow forlive view display processing shown in FIG. 5A and FIG. 5B is terminated,and the originating flow is returned to.

In this way, in the flow for live view display processing, in the caseof performing automatic horizontal correction (refer to S61), if theautomatic horizontal correction that has been set is mode 1-1 or mode1-2 movement range of the image sensor is restricted to a centralportion, and the image sensor is subjected to rotational processing to afirst angle (refer to S71 and S73). If the center of the image sensor ismoved away from the optical axis of the photographing lens 201 becauseof image stabilization, performing automatic horizontal correction willbecome increasingly difficult. Therefore, in a case of performingautomatic horizontal correction by rotating the image sensor, movementrange of the image sensor is restricted to a central portion. As aresult it is possible to sufficiently perform automatic horizontalcorrection even if the camera 1 is significantly inclined.

Also, after having performed automatic horizontal correction by rotatingthe image sensor to the first angle, body side rotational blurcorrection is performed (refer to S75). Even if automatic horizontalcorrection has performed and the image frame of the taken image becomeshorizontal, if the camera is slightly rotationally offset as a result ofuser camera shake, a horizontal line will become unstable andindistinct. Rotational blur correction is therefore performed based on acamera shake amount (Roll amount) that has been detected by the camerashake detection section 111. As a result, the image frame is stablyfixed in the horizontal line direction, and is easy to see. In thiscase, rotation amount of the image sensor is a sum of rotation amountfor automatic horizontal correction and rotation amount for camera shakeprevention, and accordingly, rotation range of the image sensor includesa rotation range for automatic leveling, and a rotation range for camerashake prevention. This rotation range may be restricted to a specifiedamount. In this way, with this embodiment, it is determined whether ornot horizontal correction of the image sensor or an output image of theimage sensor with respect to an image frame has been instructed (referto S61), angular speed of the imaging device is detected (for example,S135 in FIG. 8A), and when horizontal correction has been instructed,the image sensor is rotated so as to include at least two rotationranges, a rotation range for execution of correction to horizontal, anda rotation range for executing camera shake prevention based on angularspeed detection results (for example, S73 and S75).

Also, in a case where the automatic horizontal correction mode is mode2, an image of the image sensor is rotated using image processing (referto S81 and S83). In this case, movement range of the image sensor beingrestricted to a central portion is released. As a result it is possibleto sufficiently perform both image stabilization and automatichorizontal correction.

Also, in the event that the automatic horizontal correction mode is mode1-2, a range in which is possible to move the image sensor 105 using theimaging drive control section 109 is limited (refer to S71). This meansthat image stabilization using the imaging drive control section 109 isnot sufficient. In the case of mode 1-2, therefore, image stabilizationfor live view in the shooting standby state is performed usingelectronic image stabilization (refer to S101 and S103).

Also, in the case of a collaborative type interchangeable lens 200(SCL_Flg=2 in S93), image stabilization is performed using both imagestabilization in the camera body 100 (refer to the imaging drive controlsection 109), and image stabilization in the interchangeable lens 200(image stabilization control section 205) (refer to S111 to S119). As aresult image stabilization capability is improved.

It should be noted that if movement range of the image sensor isrestricted to a central portion in step S71, restriction of the movementrange within the flow for this live view display processing is notreleased (however, if 1st release is turned on, the movement rangerestriction is temporarily released for the purpose of AE operation andAF operation (refer to S261 in FIG. 20)). However, this is not limiting,and if automatic horizontal correction is performed and the image frameof a taken image becomes parallel to a horizontal line, restriction tothe movement range of the image sensor may be released. Restriction mayalso be released while the 1st release is on.

Next, detailed operation of processing to restrict movement range of theimage sensor to a central portion, in step S71 (refer to FIG. 5A), willbe described using the flowchart shown in FIG. 6. As was describedpreviously, in a case where automatic horizontal correction is performedby the imaging drive control section 109 rotating the image sensor 105,a center of rotation of the image sensor 105 is preferably close to theoptical axis of the photographing lens 201. Therefore, in a case wherethe moment for automatic horizontal correction is 1-1 or 1-2 movementrange of the image sensor is restricted to a central portion. In thisembodiment, this movement range differs depending on the amount ofcamera shake etc.

If the flow shown in FIG. 6 is commenced, first, camera shake amount TBis detected (S121). Here, the camera shake detection section 111 detectscamera shake amount TB. Shutter speed SS is then detected (S123). Here,the exposure control section 112 calculates subject brightness based onimage data that has been output from the image sensor 105, andcalculates electronic shutter speed SS of the image sensor 105 based onthis subject brightness. It should be noted that in a case where thecamera body 100 is provided with a mechanical shutter, shutter speed ofthe mechanical shutter is calculated. Next, focal length f is detected(S125). In step S33 (refer to FIG. 4), focal length information isacquired as lens basic information.

Next, a central portion restriction range W is calculated (S127).Restriction range for movement of the image sensor 105 differs dependingon camera shake amount TB, shutter speed SS, and focal length f. Here,the system control section 130 calculates this restriction range W basedon the equation (1) below. It should be noted that this restrictionrange W will be described later using FIG. 7A to FIG. 7C. Here, Fn (TB,SS, f) means a function of camera shake amount TB, shutter speed SS, andfocal length f, and may be a function Fn that gives characteristics suchas shown in FIG. 7A to FIG. 7C.W=Fn(TB,SS,F)  (1)

Once the restriction range W has been calculated, next, the image sensoris restricted to the central portion restriction range W (S129). Here,movement range of the image sensor 105 is restricted. If thisrestriction has been performed, then when the imaging drive controlsection 109 drives the image sensor 105 in previously described stepsS73, S95, S97, S115 and S117, drive is performed with the centralportion of the image sensor restricted to the restriction range W. Oncethe image sensor has been restricted to the restriction range W the flowof FIG. 6 is terminated, and the originating flow is returned to. Itshould be noted that with this embodiment, although the restrictionrange W changes in accordance with the three parameters of camera shakeamount TB, shutter speed SS and focal length f, it is also possible touse only some of these three parameters, and further to add otherparameters.

Next, the restriction range W entered in equation (1) described abovewill be described using FIG. 7A to FIG. 7C. FIG. 7A is a graph showingthe relationship between camera shake amount TB and restriction range W.As will be understood from FIG. 7A, in a case where camera shake thesmall, the restriction range W is wide, but if camera shake amount TBbecomes large the restriction range becomes narrow.

FIG. 7B is a graph showing a relationship between shutter speed SS andrestriction range W. As will be understood from FIG. 7B in a case whereshutter speed SS is fast, restriction range W is wide, but if shutterspeed SS becomes slow the restriction range becomes narrow.

FIG. 7C is a graph showing a relationship between focal length f andrestriction range W. As will be understood from FIG. 7C, in a case wherefocal length the short (wide-angle side) restriction range W is wide,but if focal length is long (telephoto side) the restriction range Wbecomes narrow. If a focal length that is longer than a specified focallength is reached, the effects of camera shake become significant, andit becomes preferable to perform image stabilization. In the case of along focal length, therefore, a range in which it is possible to moveduring live view (restriction range W) is restricted to a small range sothat an image stabilization region during actual exposure will becomesufficiently large.

Next, before describing computational processing for the first angleshown in FIG. 8A and FIG. 8B, the first angle and the second angle willbe described using FIG. 9. FIG. 9 is a drawing showing a first angle forrotating the image sensor about the optical axis in order tohorizontally correct the image sensor or an output image of the imagesensor with respect to an image frame, and a second angle for rotatingthe image sensor about the optical axis in order to horizontally correctthe image sensor or an output image of the image sensor with respect toa camera base surface. The first angle is a calculated output value, andthe second angle is a fixed value. The image sensor 105 arranged withinthe camera body 100 is arranged so that it can be freely moved on animage stabilization unit 109 a. The image stabilization unit 109 a isfixed to the camera body 100 using attachment pins 109 b. Also, theimage stabilization unit 109 a has a drive mechanism for moving theimage sensor 105 in the X direction and the Y direction. It is furtherpossible for the image stabilization unit 109 a to rotational drive theimage sensor 105 2.

When the camera body 100 is in a stationary state an X direction of anattachment surface of the image stabilization unit 109 a is ideallyparallel to a horizontal surface H. However, when the camera body 100 isgrasped by the user, it is subjected to vibration due to camera shakeetc. As a result, a first angle θ1 arises between a direction that isperpendicular to the horizontal surface H (vertical direction) and the Ydirection. The camera shake detection section 111 can detect this firstangle θ1.

Also, it has been assumed that the image stabilization unit 109 a willbe attached to the camera body 100 so that a Y direction of theattachment surface of the image stabilization unit 109 a becomesorthogonal to a base surface (also serving as a tripod attachmentsurface) B of the camera body 100. However, in actual fact, whenattaching the image stabilization unit 109 a to the camera body 100 atthe factory, the attachment surface is offset, albeit only slightly, bya second angle θ2. This second angle θ2, which is an attachment error,is measured at the time of factory shipping, and stored in thenonvolatile memory 122

Next, operation for first angle computational processing will bedescribed using the flowcharts shown in FIG. 8A and FIG. 8B. The flowfor this first angle computational processing is executed by the systemcontrol section 130 in parallel with the main flow that was shown inFIG. 3. As shown in FIG. 10A to FIG. 100 that will be described later, aresponse characteristic of this first angle is gentle compared to theresponse characteristic for rotational blur correction for performingimage stabilization. Specifically, in the flow for first anglecalculation a response characteristic of the first angle is made to begentle by calculating an average value of camera shake amounts that havebeen detected at predetermined time intervals by the blur detectionsection 111.

If the flow for first angle computational processing shown in FIG. 8A iscommenced, it is first determined whether or not the power supply is on(S131). Here, the system control section 130 determines whether or notthe power supply switch of the operation section 119 is on. If theresult of this determination is that the power supply switch is off, theflow for first angle computational processing is terminated.

If the result of determination in step S131 is that the power supply ison, AVR1=second angle is set (S133). If the power supply is turned on,the power supply control section 118 supplies power to each sectionwithin the camera body 100 and the interchangeable lens 200.Accompanying this, power is also supplied to the camera shake detectionsection 111, and power is fed to sensors for camera shake detection,such as the acceleration sensor. Also, the system control section 130reads out the second angle that has been stored in the nonvolatilememory 122, and temporarily stores the second angle in register AVR1within the system control section 130. As described previously, thesecond angle corresponds to an offset from a reference position when theimage sensor 105 was attached, and camera shake amount is acquired withthis angle as a reference angle.

Next, camera shake amount is detected (S135). Here, the system controlsection 130 acquires a camera shake detection result from the camerashake detection section 111. Next, M is calculated in accordance withcamera shake amount that was detected in step S135 (S137). Here, thesystem control section 130 obtains M in accordance with the camera shakeamount data has been acquired. As a calculation equation, it ispreferable to have an equation such that if camera shake amount is largethen M is large, and if camera shake amount is small M is small.

Next, P=1 is set (S139). P represents an order (address) of register A1(refer to step S141) which will be described later, and in this step “1”is set as an initial value for P. Next, A1(P)=AVR1 is set (S141). Here,the second angle that was set in step S133 is set in the Pth registerA1. Next it is determined whether or not P=M (S145), and if the resultof this determination is not P=M, P=P+1 is set (S143), and processingreturns to step S141. If the result of determination in step S145 isthat P=M, then the AVR1 of step S133, namely the second angle, is set ineach register of register A1(1) to A1(M).

If the result of determination in step S145 is that P=M, N=1 is set(S151). N represents an order (address) of register A1(N) (refer to stepS155) which will be described later, and in this step “1” is set as aninitial value for N. Acceleration sensor output ACC is then read out(S153). Here, the system control section 130 reads output ACC from theacceleration sensor etc. within the camera shake detection section 111.

Once the acceleration sensor output ACC has been read, nextA1(N)=Fn1(ACC) is calculated (S155). The system control section 130performs calculation by assigning the acceleration sensor output ACCthat was read in step S153 to function Fn1, and temporarily stores theresult of this calculation in register A1(N). The function Fn1 should bea function that can convert acceleration sensor output ACC to the firstangle.

Next, AVR1=SUM((A1(1):A1(M))/M is calculated (S157). Here, the systemcontrol section 130 calculates an average value of values that have beencomputed with acceleration sensor output ACC in function Fn1, bydividing a cumulative value of A1 from N=1 to N=M by M, and makes thisvalue AVR1. When N=1, only A1(1) is acceleration sensor output ACC, andthe second angles for steps S133 to S145 are only stored in registersA1(2) to A1(M). This means that when N=1, AVR1 is a value that is closeto the second angle. After that, every time 1 is added to N in stepS165, AVR1 that is calculated in step S157 gradually moves away from thesecond angle, and approaches an average value for calculation results ofacceleration sensor output ACC. Then, AVR1 is output as the first angle(S159). Here, AVR1 that was calculated in step S157 is output as thefirst angle.

A predetermined time is made a timer count (S161). Here, lapse of thepredetermined time is awaited. In this way, reading of accelerationsensor output ACC can be performed at predetermined time intervals. Ifthe predetermined time has elapsed, it is determined whether or not N=M(S163). If the result of this determination is not that N=M, N=N+1 isset (S165), and step S153 is returned to. N is set to an initial valuein step S151, and this N represents a sequential order (address) ofregister A1. Also, M is a value that was calculated in step S137, andrepresents a number of registers that have been created as A1.Accordingly, when N=M it means that first angles that have beensequentially obtained at predetermined time intervals from theacceleration sensor output ACC are stored in M registers A1.

If the result of determination in step S163 is that N=M, it isdetermined whether or not the power supply is on (S167). Here, similarlyto step S161, the system control section 130 determines whether or notthe power supply switch of the operation section 119 is on. If theresult of this determination is that the power supply switch is on, stepS135 is returned to. On the other hand, if the power supply switch isoff, the flow for first angle computational processing is terminated.

In this way, in the flow for first angle computational processing, for anumber of times (M) corresponding to camera shake amount an averagevalue of computational results of output from the camera shake detectionsection 111 is calculated (refer to S157), and this value is output asthe first angle. An average value of detection results detected M times,with the number M corresponding to camera shake amount, is made thefirst angle. This means that the first angle is not superimposed with anerror caused by momentary camera shake, it is possible to make the firstangle a stable value that has had the effects of camera shake removed.

Next, the response characteristic for rotation velocity of the imagesensor 105 will be described using FIG. 10A to FIG. 100. In steps S67,S73, S75, S81, S99 and S119 in the flow of FIG. 5A, rotation processingfor automatic horizontal correction and rotational blur correction isperformed. Specifically, the image sensor 105 is rotated so that animage frame of a taken image is aligned with the horizontal line, andfurther the image sensor 105 is rotated so as to eliminate rotationalblur caused by camera shake. Any of those rotations are for performingrotation of the image sensor 105, but the purposes and causes ofperforming rotation are different, with one being rotation for thepurpose of automatic horizontal correction for leveling a taken image,and the other being rotation for the purpose of rotational blurcorrection to correct minute rotational rocking caused by camera shake.As a result, making responsiveness for automatic horizontal correctionand responsiveness for image stabilization different in accordance withmagnitude of camera shake amount is better for improving correctionprecision and stability, and results in good usability. It should benoted that in FIG. 10A to FIG. 100 line AS represents the first anglesetting or the second angle setting, and line AS represents rotationalblur correction.

Rotational speed and response characteristic of the image sensor at thetime of normal camera shake are shown in FIG. 10A. Until rotationalspeed of the image sensor for automatic horizontal correction is in thevicinity of v2, responsiveness for first angle setting or second anglesetting AS is made 100%. If rotation speed of the image sensor becomesfaster than v1 response for first angle setting or second angle settingAS is lowered, and responsiveness for rotation speed of the image sensorfor rotational blur correction is increased. In other words, if rotationusing the first angle setting or second angle setting AS is slow, it isperformed at low speed. Faster rotational blur is corrected usingrotational blur correction IS. Therefore, if rotation speed of the imagesensor exceeds v3 response characteristic for rotation velocity of theimage sensor for the purpose of rotational blur correction is made 100%.

As was described previously, if the example shown in FIG. 10A is made areference, a time when camera shake is more intense than this as shownin FIG. 10B. With this example, until rotational velocity of the imagesensor is v4 response characteristic of the first angle setting orsecond angle setting AS is made 100%, and response characteristicreduces from that point until rotation speed v5. Specifically, in a casewhere camera shake is intense, rotation speed of the image sensor 105for the purpose of first or second angle setting AS for automatichorizontal correction becomes a lower response characteristic comparedto the previously described reference. On the other hand in a case ofperforming rotational blur correction IS, responsiveness of rotationspeed of the image sensor changes similarly to at the time of thereference.

Also, when camera shake is smaller than in the example shown in FIG.10A, for example, a case where a camera is fixed to a tripod, is shownin FIG. 10C. In this case, until rotational velocity of the image sensoris v9 response characteristic of the first angle setting or second anglesetting AS is made 100%, and response characteristic reduces from thatpoint until rotation speed v10. Specifically, in a case where camerashake is small, rotation speed of the image sensor 105 for the purposeof first or second angle correction for automatic horizontal correctionbecomes a faster response characteristic. This means that rotation usingfirst angle setting or second angle setting AS is performed at a higherspeed than for the reference. On the other hand in a case of performingrotational blur correction, responsiveness of rotation speed of theimage sensor changes similarly to at the time of the reference.

In this way, with this embodiment, rotation speed of the image sensorwhen performing automatic horizontal correction is slower than rotationspeed for body side rotational blur correction (Roll). Specifically,acceleration that arises due to camera shake will be added to the firstangle (automatic horizontal correction) obtained from direction ofgravitational acceleration. As a result, in order to remove errorscaused by camera shake from direction of gravitational acceleration, thefirst angle is obtained from a cumulative average over an appropriatetime, and there is no response to frequency of camera shake (referred toS153 to S163 in FIG. 8B, and S73 and S83 in FIG. 5A). On the other hand,because rotational blur due to camera shake becomes high-frequency, thisfrequency component is processed as rotational blur correction (refer toS75). Specifically, the first angle for automatic horizontal correctionis acquired based on detection result of a gravitational accelerationsensor of the camera shake detection section 111 (refer to ACC in S155),and blur amount for image stabilization is acquired based on detectionresult of an angular speed sensor of the camera shake detection section111 or 209. An average value is used for the purpose of automatichorizontal correction, while this type of average processing is notperformed for the purpose of image stabilization. It should be notedthat rotation speeds v1, v3, v4, v5, v9, and v10 at the time of firstangle setting represent rotational responsiveness, and setting ofresponsiveness can be achieved by changing the “M” in S137 of FIG. 8A.

Next, the trimming and resizing processing (1) of image data in step S83of FIG. 5A will be described using FIG. 11. In step S81 rotationprocessing is performed on image data based on the first angle.Specifically, in the trimming and resizing processing of step S83,rotation processing is applied to an output image of the image sensor105, this image that has been subjected to rotation processing istrimmed so that the image frame of the image becomes level, and theimage that has been trimmed is resized.

In FIG. 11, image P1 is an image that has been acquired by the imagesensor 105 at time t1, and image Pt1 is a trimming image. Also, image P2is an image that was acquired by the image sensor 105 at time t2, andthe image processing section 107 cuts out an image that is inclined bythe first angle to generate trimming image Pt2. Similarly, image P3 isan image that was acquired by the image sensor 105 at time t3, and theimage processing section 107 cuts out an image that is inclined by thefirst angle to generate trimming image Pt3

In this way, in the example shown in FIG. 11 trimming images Pt1 to Pt3have the effects of any camera shake removed by step S79, to give imagesthat have been subjected to automatic horizontal correction processingby rotation of image data. At this time, since a region that is actuallyphotographed and stored is a trimming image region, in order to displayon the display section 120 (rear surface monitor 23, EVF 21) as a liveview image the image processing section 107 then applies resizingprocessing to the trimming images Pt1 to Pt3 so that they become thesame size as the image frame of the display section. Resized image Pt2 rshown in FIG. 11 is an image resulting from having resized the trimmingimage Pt2. Resizing processing is also applied to trimming images Pt1and Pt3 for display on the display section 120.

Next, the trimming and resizing processing (2) of image data in stepS105 of FIG. 5B will be described using FIG. 12. Image stabilization isperformed using electronic image stabilization in step S103, but at thistime rotation processing of an image is not applied. That is, the imageprocessing section 107 performs image cutout (trimming) on an outputimage of the image sensor so as to eliminate camera shake caused byshift blur (X, Y), but the image processing section 107 does notspecially perform rotation processing of the image so that a physicalobject becomes level.

In this way, in the example shown in FIG. 12 trimming images Pt11 toPt13 are images that have had the effects of any camera shake removed.However, since they are trimming images, then similarly to the case ofFIG. 11, the image processing section 107 applies resizing processing tothe trimming images Pt11 to Pt13 so as to become the same size as theimage frame of the display section. Resized image Pt12 r shown in FIG.12 is an image resulting from having resized the trimming image Pt12.Resizing processing is also applied to trimming images Pt11 and Pt13 fordisplay on the display section 120.

Next, operation of the automatic leveling GUI display processing in stepS77 (refer to FIG. 5A) will be described using the flowchart shown inFIG. 13. As was described previously, in a case where the automatichorizontal correction button 35 has been operated and automatichorizontal correction mode has been set, a display for confirminghorizontal is displayed superimposed on a live view image. This flowshows processing for displaying a display for confirming beinghorizontally leveled.

If the flow for automatic leveling GUI display processing is commenced,first, guideline displayed on is performed (S171). Here, the systemcontrol section 130 displays guidelines on the display section 120. Asguidelines, for example, the horizontal line 120 a and the vertical line120 b are displayed, as shown in FIG. 16A. The horizontal line 120 a isa line that is parallel to the upper edge and lower edge of the monitorscreen within the display section 120 and is midway between the upperedge below edge. Also, the vertical line 120 b is a line that isparallel to the left edge and right edge of the monitor screen withinthe display section 120, and is midway between the left edge and rightedge. There may also be display that is useful at the time of confirmingthat the screen is horizontal, such as displaying grid lines.

If guide display is turned on, it is next determined whether or not toturn on spirit level display (S173). The user can set a spirit leveldisplay mode on a menu screen etc. Here, the system control section 130determines whether or not the spirit level display mode has been set. Itshould be noted that as well as a menu screen, any operation memberwithin the operation section 119 may be used for spirit level displaymode setting.

If the result of determination in step S173 is that spirit level displaymode is set, spirit level display processing is executed (S175). Here,spirit level display is performed on the display section 120 (rearsurface monitor 23 or EVF 21), and Roll inclination amount and Pitchinclination amount etc. that have been detected by the gravitationalacceleration sensor within the camera shake detection section 111 aredisplayed. Spirit level display has Roll inclination amount measurementranges 120 c, 120 d, Pitch inclination measurement ranges 120 e, 120 f,Roll display 120 g, and Pitch display 120 h, as shown in FIG. 16A. Alsothe Roll inclination amount measurement ranges 120 c and 12 d showranges of Roll inclination amount capable of being detected by thecamera shake detection section 111. Pitch inclination amount measurementranges 120 e and 120 f shown range of Pitch inclination amounts capableof being detected by the camera shake detection section 111.

Roll inclination is inclination in a lateral direction, when looking atthe camera 1 from the front, as shown to the lower right of the displaysection 120 in FIG. 16A. Specifically, Roll inclination amountrepresents turning amount about the optical axis, looking at the camera1 from the front. Pitch inclination amount is inclination in a verticaldirection when looking at the camera 1 from the side, as shown to theupper right of the display section 120 in FIG. 16A. Specifically, Pitchintonation amount is an inclination amount in the vertical directionwhen an axis in a longitudinal direction of the camera 1 is made anaxis. Roll display 120 g is Roll inclination amount that has beendetected by the camera shake detection section 111. Pitch display 120 his Pitch inclination amount that has been detected by the camera shakedetection section. Detailed operation of the spirit level displayprocessing of step S175 will be described later using FIG. 15A and FIG.15B.

If spirit level display processing has been performed in step S175, orif the result of determination in step S173 is that spirit level displaymode has not been set, this flow is terminated and the originating flowis returned to.

Next, a modified example of operation of the automatic leveling GUIdisplay processing in step S77 (refer to FIG. 5A) will be describedusing the flowchart shown in FIG. 14. With the automatic leveling GUIdisplay processing that was shown in FIG. 13, determination as towhether or not to perform spirit level display was performed.Specifically, it was possible for the user to select whether or not toperform spirit level display. However, with the modified example shownin FIG. 14, in the event that automatic horizontal correction mode hasbeen set, the spirit level display mode is automatically set.

Compared to the flowchart shown in FIG. 13, the modified example shownin FIG. 14 has step S173 of FIG. 13 replaced with S174 in FIG. 14.Specifically, if guideline display is turned on in step S171, thenspirit level display is turned on in step S174, and spirit level displayprocessing is performed in step S175.

According to this modified example, when the automatic horizontalcorrection button 35 is operated and automatic horizontal correctionmode has been set, spirit level display is automatically performed. Inorder to confirm whether or not automatic horizontal correction ispossible, and whether or not automatic horizontal correction hasfunctioned effectively and completed it is necessary to confirm thecurrent degree of horizontal inclination of the camera. It is thereforepossible to simplify total operations by linking an operation forcalling up the spirit level with operation to perform automatichorizontal correction.

Next, the spirit level display processing of step S175 (refer to FIG. 13and FIG. 14) will be described using the flowcharts shown in FIG. 15Aand FIG. 15B.

If the flow for spirit level display processing is commenced, first ofall Roll angle R and Pitch angle P of the imaging device are acquired(S181). Here, the system control section 130 acquires Roll angle R andPitch angle P of the camera 1 using the camera shake detection section111. It should be noted that the first angle that was calculated in FIG.8A and FIG. 8B is a value for counteracting Roll angle.

Next, R and P are reflected on the angle display section of the spiritlevel display (S183). Here, Roll display 120 g is displayed based on theRoll angle R that was acquired in step S181. Specifically, an angleformed by the Roll display 120 g and the horizontal line 120 a changesin accordance with Roll angle of the camera 1. For example, in a casewhere the camera 1 is inclined, as shown on the viewfinder screen F1 inFIG. 16A, inclination of the roll display 120 g is displayed large. Onthe other hand, in a case where the camera 1 is not inclined, as shownin the viewfinder screen F2, the roll display 120 g is displayedsuperimposed on the horizontal line 120 a.

Also, in step S183 Pitch display 120 h is displayed based on the Pitchangle P that was acquired in step S181. Specifically, position of thePitch display 120 h with respect to the vertical line 12 a changes inaccordance with Pitch angle of the camera 1. For example, as shown onthe viewfinder screen F3 in FIG. 16B, if the camera 1 is tilted thePitch display 120 h, a distance by which it is separated from the centerof the vertical line 120 b is large, while if the camera 1 is not tiltedthe Pitch display 120 h is displayed at a substantially central positionof the vertical line 120 b.

Next it is determined whether or not Roll angle R is substantially 0(S185). Here, the system control section 130 determines whether or notthe Roll angle R that was acquired in step S181 is smaller than aspecified value close to 0.

If the result of determination in step S185 is that the Roll angle R isnot substantially zero, specifically that the Roll angle of the camera 1is larger than 0° by a specified amount, the R angle display section ischanged to a first color (S187). Here, the system control section 130changes the color of the Roll display 120 g, as the R angle displaysection, to a first color, as shown on the viewfinder screen F1 in FIG.16A. Since the value of the Roll angle R is not substantially zero thecamera 1 is laterally tilted viewed from the front, and the bottom edgeof a frame of a taken image is not parallel with an external horizontalline. Generally, an image that is not horizontal has the possibility ofbeing an image that is uncomfortable to look at, and so the first coloris preferably a color that lets the user know this. Specifically, if theRoll angle R is not substantially 0, then since there is a state wherethe live view display has not been subjected to automatic horizontalcorrection, the fact that there was a state where it has not beenleveled with the camera in an inclined state is displayed by changingthe color of the Roll display 120 g to the first color.

On the other hand, if the result of determination in step S185 is thatthe Roll angle R is substantially 0, the R angle display section ischanged to a second color (S187). Here, the system control section 130changes the color of the Roll display 120 g, as the R angle displaysection, to a second color, as shown on the viewfinder screen F2 in FIG.16A. Since the value of the Roll angle R is substantially zero thecamera 1 is not laterally tilted viewed from the front, and the bottomedge of a frame of a taken image is parallel with an external horizontalline. The second color is preferably a color that lets the user knowthis fact (for example, green or blue). Specifically, if the Roll angleR is substantially 0, then since there is a state where the live viewdisplay has been subjected to automatic horizontal correction, the factthat there is a state where leveling has been performed is displayed bychanging the color of the Roll display 120 g to the second color.

It should be noted that with this embodiment the color of the Rolldisplay 120 g is set to either a first or a second color in accordancewith value of angle R, but difference in value of the angle R may bedisplayed using three or more colors. It is also possible not only tochange the “color” of the Roll display 120 g in accordance withdifference in value of angle R, but also to change line type, such asbold line or fine line, solid line or dashed line etc. It is alsopossible to perform (warning) display using text or pictographs, inaccordance with size of the Roll angle R.

If change in color of the R angle display section has been performed instep S187 or S189, it is next determined whether or not Pitch angle P issubstantially 0 (S191). Here, the system control section 130 determineswhether or not the Pitch angle P that was acquired in step S181 issmaller than a specified value close to 0.

If the result of determination in step S191 is that the Pitch angle P isnot substantially zero, specifically that the Pitch angle of the camera1 is larger than 0° by a specified amount, the P angle display sectionis changed to a first color (S193). Here, the system control section 130changes the color of the Pitch display 120 h, as the P angle displaysection, to a first color, as shown on the viewfinder screen F3 in FIG.16B. Since the value of the Pitch angle P is not substantially 0, thecamera 1 is inclined when viewed from the side, and a taken image willbe directed above or below a horizontal line. Generally, an image thatis looking upward or looking downward from a horizontal line has thepossibility of being an image that is uncomfortable to look at, and sothe first color is preferably a color that lets the user know this.

On the other hand, if the result of determination in step S191 is thatthe Pitch angle P is substantially 0, the P angle display section ischanged to a second color (S195). Here, the system control section 130changes the color of the Pitch display 120 h, as the P angle displaysection, to a second color, as shown on the viewfinder screen F4 in FIG.16B. Since the value of the Pitch angle P is substantially zero, thecamera 1 is an image looking in a direction of the horizontal line. Thesecond color is preferably a color that lets the user know this fact(for example, green or blue).

It should be noted that with this embodiment, although the color of thePitch display 120 h is set to either a first or a second color inaccordance with value of Pitch angle P, difference in value of the angleP may be displayed using three or more colors. It is also possible notonly to change the “color” of the Pitch display 120 h in accordance withdifference in value of angle P, but also to change line type, such as,bold line or fine line, solid line or dashed line etc. It is alsopossible to perform display using text or pictographs, in accordancewith size of the Pitch angle P.

If color of the P angle display section has been changed in step S193 orS195, it is next determined whether or not automatic horizontalcorrection is on (S201). The user operates the automatic horizontalcorrection button 35 in the case of performing automatic horizontalcorrection. Here, the system control section 130 determines whether ornot automatic horizontal correction mode has been set by operation ofthe automatic horizontal correction button 35. If the result of thisdetermination is that automatic horizontal correction is not on, theflow for spirit level display processing is terminated and theoriginating flow is returned to.

If the result of determination in step S201 is that automatic horizontalcorrection is on, it is determined whether or not automatic horizontalcorrection is possible (S203). It is possible to automatically make animage frame of a taken image horizontal by having the imaging drivecontrol section 109 rotate the image sensor 105 so that the Roll angle Rthat was detected in step S181 becomes substantially 0. However in acase where the Roll angle R is large the range in which the image sensor105 can be rotated is exceeded, and it is not possible to make the imageframe of the taken image horizontal. In this step, the system controlsection 130 determines whether or not automatic horizontal correction ispossible based on Roll angle R and current rotation amount of the imagesensor 105 from the imaging drive control section 109.

If the result of determination in step S203 is that automatic horizontalcorrection is not possible, the R angle display section is changed to athird color (S205). Here, the system control section 130 changes thedisplay color for the Roll display 120 g to a third color (for examplered) to notify the user that automatic horizontal correction is notpossible, as shown in the viewfinder screen F5 in FIG. 16C. The userrotates the camera 1 in the Roll direction until the third color (forexample, red) becomes the original first color (for example, black).

On the other hand, if the result of determination in step S203 is thatautomatic horizontal correction is possible, a display of R=0 isadditionally displayed on the R angle display section (S207). Here, asshown in the viewfinder screen F6 in FIG. 16C, since the Roll angle ofthe camera 1 is within the range in which automatic horizontalcorrection is possible, the system control section 130 changes displaycolor of the horizontal line display 120 a to a second color (forexample green or blue), to notify the user of the fact that automatichorizontal correction is possible. Also, Roll display 120 g representingRoll angle of the camera 1 is displayed in a first color (for example,black), and it is possible for the user to know that automatichorizontal correction is performed by the camera from the difference inoperating mode of the spirit level display.

Next, a modified example of spirit level display processing will bedescribed using FIG. 16D. With the example shown in FIG. 16A to FIG.16C, Roll inclination amount measurement ranges 120 c, 120 d that can bedetected by the camera shake detection section 111 were displayed.However, as was described previously, it is not possible to performautomatic horizontal correction in the entire range in which inclinationamount can be detected. With this modified example a range in whichautomatic horizontal correction is possible is displayed in addition tothe range in which inclination amount can be detected.

As shown in FIG. 16D, with this modified example automatic horizontalcorrection ranges 120 j and 120 k are displayed in addition to the Rollinclination amount measurement ranges 12 c and 120 d. The viewfinderscreen F7 displays a case where automatic horizontal correction is notpossible. In this case, the Roll display 120 g is outside the range ofthe automatic horizontal correction ranges 120 j and 120 k. At thistime, in order to alert the user to being outside the automatichorizontal correction range, the Roll display 120 g is changed to athird color (for example, red).

Also, the viewfinder screen of FIG. 16D displays a case where automatichorizontal correction is possible. In this case, the Roll display 120 gis within the range of the automatic horizontal correction ranges 120 jand 120 k. At this time, in order to alert the user that automatichorizontal correction is possible, the horizontal line display 120 a ischanged to a second color (for example, green or blue etc.).

In this way, with this modified example, the imaging device has animaging device inclination amount display section (Roll inclinationamount measurement ranges 120 c, 120 d) showing amount of inclination,and an automatic horizontal correction possible range display section(automatic horizontal correction ranges 120 j and 120 k) showing aninclination range in which automatic horizontal correction is possible.This means that it is possible for the user to execute prompt automatichorizontal correction by referencing these displays.

Next, the operation member processing of step S7 (refer to FIG. 3) willbe described using the flowchart shown in FIG. 17. As was describedpreviously, the operation section 119 comprises various operationmembers such as the shooting mode dial 25, shutter button 27, F dial 29f, R dial 29 r, automatic horizontal correction button 35 and imagestabilization button 37 etc. In step S7, processing is executed whenthese operation members have been operated, but the flow shown in FIG.17 will be described centering on processing when, among these operationmembers, the automatic horizontal correction button 35 and imagestabilization button 39 have been operated.

If the flow for operation member processing is commenced, first of alldetermination is performed as to whether or not the automatic horizontalcorrection button has been pressed down (S211). Here, the system controlsection 130 determines whether or not the automatic horizontalcorrection button 35 has been operated using the operation section 119.

If the result of determination in step S211 is that the automatichorizontal correction button 35 has been pressed down, automatichorizontal correction button pressing processing is performed (S213). Ifthe automatic horizontal correction button 35 is operated, automatichorizontal correction on off processing is performed. Also, there arethree modes for automatic horizontal correction, as was describedpreviously, namely mode 1-1, mode 1-2, and mode 2, and one of thesemodes is set. Detailed operation of this automatic horizontal correctionbutton pressing processing will be described later using FIG. 18.

If the automatic horizontal correction button pressing processing isexecuted in S213, or if the result of determination in step S211 is thatthe automatic horizontal correction button 35 has not been pressed down,it is next determined whether or not the image stabilization button hasbeen pressed down (S215). Here, the system control section 130determines whether or not the image stabilization button 37 has beenoperated using the operation section 119.

If the result of determination in step S215 is that the imagestabilization button 37 has been pressed down, image stabilizationbutton pressing processing is performed (S217). If the imagestabilization button 37 has been operated, image stabilization on offprocessing is performed. Specifically, if the image stabilization button37 is pressed down with image stabilization in an on state imagestabilization is turned off, while if the image stabilization button 37is pressed down with image stabilization in an off state imagestabilization is turned on.

If the image stabilization button pressing processing has been executedin step S217, or if the result of determination in step S215 is that theimage stabilization button has not been pressed down, other operationmember processing is performed (S219). Here, it is determined whether ornot an operation member other than the automatic horizontal correctionbutton 35 and the image stabilization button 37 has been operated, andif the result is that another operation member has been operated,processing depending on the operation member that has been operated isexecuted. If other operation member processing has been executed, theoriginating flows returned to.

Next, the automatic horizontal correction button pressing processing ofstep S213 (refer to FIG. 17) will be described using the flowchart shownin FIG. 18.

If the flow for automatic horizontal correction button pressingprocessing is commenced, it is first determined whether or not theautomatic horizontal correction button is being pressed (S221). Thepreviously described three modes are changed by the user performing arotation operation on the F dial 29 f or R dial 29 r while pressing downthe automatic horizontal correction button 35. In this step, the systemcontrol section 130 determines whether or not the F dial 29 f or R dial29 r is being subjected to a rotation operation at the same time as theautomatic horizontal correction button 37 is being pressed down.

If the result of determination in step S221 is that the automatichorizontal correction button is being pressed down, dial rotation whilebutton is pressed processing is executed (S223). Here, the systemcontrol section 130 performs change of automatic horizontal correctionmode in accordance with the rotation operation of the F dial 29 f or Rdial 29 r. If this dial rotation with button pressed processing isperformed, step S221 is returned to. Detailed operation of the dialrotation while button is pressed processing will be described laterusing FIG. 19.

If the result of determination in step S221 is that the automatichorizontal correction button is not being pressed down, it is determinedwhether or not there is a dial rotation operation (S225). Here, thesystem control section 130 determines whether or not there was arotation operation of the F dial 29 f or the R dial 29 r in step S223.

If the result of determination in step S225 is that there is not a dialrotation operation, determination is performed regarding the automatichorizontal correction flag AHC_Flg (S227). If the user has only presseddown the automatic horizontal correction button 35 and there is norotation operation of the F dial 29 f or R dial 29 r, the only operationthat is performed is changing whether automatic horizontal correction ison or off. Here, it is determined whether the automatic horizontalcorrection flag AHC_Flg that is stored in the memory within the systemcontrol section 130 or the nonvolatile memory 122 is “1” or “0”.

If the result of determination in step S227 is that AHC_Flg=1, automatichorizontal correction flag AHC_Flg=0 is set (S229). In this case theautomatic horizontal correction was turned on, and since the automatichorizontal correction button 35 has been operated automatic horizontalcorrection flag AHC_Flg=0 is set, to turn the automatic horizontalcorrection off.

On the other hand, if the result of determination in step S227 is thatAHC_Flg=0, or if the result of determination in step S225 is that therehas been a dial rotation operation, automatic horizontal correction flagAHC_Flg=1 is set (S231). In this case the automatic horizontalcorrection was turned on, and since the automatic horizontal correctionbutton 35 has been operated automatic horizontal correction flagAHC_Flg=0 is set to turn the automatic horizontal correction off. Also,there may be cases where there are further dial rotation operations in astate where automatic horizontal correction is on. In this case also,automatic horizontal correction flag AHC_Flg=1 is set in order tomaintain the automatic horizontal correction on state.

If “0” or “1” has been set in the automatic horizontal correction flagAHC_Flg in steps S229 or S231, next, the image sensor is reset to anoptical axis central portion (S233). Here, the system control section130 moves the center of the image sensor 105 so as to be lined up withthe optical axis of the photographing lens 201, using the imaging drivecontrol section 109. If the automatic horizontal correction button 35has been operated, a sufficient inclination range for automatichorizontal correction is ensured by resetting the image sensor 105 to anoptical axis central portion. If the image sensor has been reset to theoptical axis central portion, automatic leveling button pressingprocessing is completed, and the originating flow is returned to.

In this way, with this embodiment, pressing operation processing for theautomatic horizontal correction button 35 is made up of the followingtwo operation processes.

-   -   button press down+dial . . . setting of automatic leveling        correction mode, mode 1-1, mode 1-2, mode 2    -   only button press down . . . toggle between automatic leveling        correction on and off

Next, the dial rotation while button is pressed processing of step S223(refer to FIG. 18) will be described using the flowchart shown in FIG.19. It should be noted that automatic horizontal correction mode Flg=1within this flow corresponds to mode 1-1, automatic horizontalcorrection mode Flg=2 corresponds to mode 1-2, and automatic horizontalcorrection mode Flg=3 corresponds to mode 2. The automatic horizontalcorrection mode Flg has its newest value stored in memory within thesystem control section 130 or in the nonvolatile memory 122.

If the flow for dial rotation while button is pressed processing iscommenced, whether or not there is a dial operation, and rotationdirection, are determined (S241). Here, the system control section 130detects whether the user has rotated the F dial 29 f or the R dial 29 r,and if there is rotation detects the direction of that rotation.

If the result of determination in step S241 is that the dial rotationdirection is right direction rotation, it is determined whether or notthe automatic horizontal correction mode Flg=3 (S243). If dial rotationis the right direction, mode number changes in an increasing direction.Here, the system control section 130 performs determination based on theautomatic horizontal correction mode Flg that is stored in memory withinthe system control section 130 or in the nonvolatile memory 122.

If the result of determination in step S243 is that the automatichorizontal correction mode Flg=3, automatic horizontal correction modeFlg=1 is set (S245). Since the result of determination in step S243 isthat the automatic horizontal correction mode is mode 2, then mode 1-1should be returned to, and so automatic horizontal correction mode Flg=1is set.

If the result of determination in step S243 is not that the automatichorizontal correction mode Flg=3, the automatic horizontal correctionmode Flg is incremented (S247). In this case, if mode 1-1 was set themode advances to mode 1-2, and if mode 1-2 was set the mode advances tomode 2.

Returning to step S241, if the result of determination in this step isthat the dial rotation direction is left direction rotation, it isdetermined whether or not the automatic horizontal correction mode Flg=0(S251). If dial rotation is the left direction, mode number changes in adecreasing direction. Here, the system control section 130 performsdetermination based on the automatic horizontal correction mode Flg thatis stored in memory within the system control section 130 or in thenonvolatile memory 122.

If the result of determination in step S251 is that the automatichorizontal correction mode Flg=1, automatic horizontal correction modeFlg=3 is set (S253). Since the result of determination in step S251 isthat the automatic horizontal correction mode is mode 1-1, then mode 3should be returned to, and so automatic horizontal correction mode Flg=3is set.

On the other hand, if the result of determination in step S251 is notthat the automatic horizontal correction mode Flg=1, the automatichorizontal correction mode Flg is decremented (S255). In this case, ifmode 2 was set the mode advances to mode 1-2, and if mode 1-2 was setthe mode advances to mode 1-1.

If the automatic horizontal correction mode Flg is incremented ordecremented in step S247 or S255, or if the result of determination instep S241 is that there is no dial rotation, automatic horizontalcorrection mode icon processing is performed (S249). Here, the systemcontrol section 130 performs display of the mode that is currently seton the viewfinder screen. Also, while the automatic horizontalcorrection button 35 is being pressed down, the system control section130 may also display rotation direction of the F dial 29 f and the Rdial 29 r, and the mode change direction, on the viewfinder screen.

Next, the 1st ON processing of step S9 (refer to FIG. 3) will bedescribed using the flowchart shown in FIG. 20. This flow is executedwhen the user presses the shutter button 27 down halfway.

If the flow for 1st ON processing is commenced, first, the centralportion restriction of the movement range of the image sensor isreleased (S261). As was described previously during live view display(refer to S3 in FIG. 3), in order to widen drive range for an automatichorizontal correction operation there may be cases where movement rangeof the image sensor 105 is restricted to a central portion (refer to S71in FIG. 5A). The system control section 130 definitely performs an imagestabilization operation if the 1st release switch is on, and temporarilyreleases restriction of the movement range of the image sensor in orderto perform AE (automatic exposure) and AF (automatic focus adjustment).

If restriction of the movement range of the image sensor is released,next, AE and AF processing are performed based on a measurement frameand AF frame that have been displayed superimposed on live view (S263).Here, the system control section 130 executes AE and AF processing inthe exposure control section 112 and the AF processing section 113 etc.

If the AE and AF processing is completed, it is next determined whetheror not the 1st release switch is on (S265). Here, the system controlsection 130 determines whether or not the shutter button 27 of theoperation section 119 has being pressed down halfway and the 1st releaseswitch turned on.

If the result of determination in step S265 is that the 1st releaseswitch is off, movement range of the image sensor is restricted to acentral portion (S267). If the 1st release switch is on, sufficientimage stabilization is performed by releasing the restriction of themovement range of the image sensor, and AE/AF are performed in thatstate. However, since the 1st release switch is off, the system controlsection 130 restricts movement range of the image sensor to the centralportion, and the originating flow is returned to.

If the result of determination in step S265 is that the 1st releaseswitch is on, it is next determined whether or not the 2nd releaseswitch is on (S269). If the result of this determination is that the 2ndrelease switch is off, the determination processing of step S265 isreturned to, while if the 2nd release switch is on the originating flowis returned to.

Next, the still picture shooting processing of step S13 (refer to FIG.3) will be described using the flowchart shown in FIG. 21. This flow isexecuted when the user presses the shutter button 27 down fully.

If the flow for still picture shooting processing is commenced, first ofall the automatic horizontal correction flag AHC_Flg is judged (S271).As was described previously the system control section 130 sets theautomatic horizontal correction flag AHC_Flg to “1” if the automatichorizontal correction button 35 is on, but sets the automatic horizontalcorrection flag AHC_Flg to “0” if the automatic horizontal correctionbutton 35 is off. In this step, determination is based on the set valueof this automatic horizontal correction flag AHC_Flg.

If the result of determination in step S271 is that AHC_Flg=1, namelythat automatic horizontal correction is on, still picture shootingprocessing for at the time of automatic horizontal correction isperformed (S273). Here, the system control section 130 performsautomatic horizontal correction and performs shooting of a stillpicture. Specifically, based on detection result from the camera shakedetection section 111, the image sensor 105 or taken image data isrotated so that a frame of a photographing screen becomes horizontal inthe shooting standby state, and performs shooting of a still picturewhile performing image stabilization that includes rotational blurcorrection so as to keep the image frame in a horizontal state. Detailedoperation of this still picture shooting processing at the time ofautomatic horizontal correction will be described later using FIG. 22Ato FIG. 22C.

On the other hand, if the result of determination in step S271 is thatAHC_Flg=0, namely that automatic horizontal correction is off, normalstill picture shooting processing is performed (S275). Here, the systemcontrol section 130 performs shooting processing for a still picturewithout performing processing for automatic horizontal correction.

If still picture shooting processing is being performed in step S273 orS275, the flow for still picture shooting processing is terminated andthe originating flow is returned to. In this way, in the flow for stillpicture shooting processing, in a case where the automatic horizontalcorrection button 35 is operated and automatic horizontal correction isturned on, the image sensor 105 is adjusted based on detection resultfrom the camera shake detection section 111 which means that it ispossible to make an image frame of a taken image horizontal, and toperform shooting that does not look bad.

Next, the still picture shooting processing at the time of automatichorizontal correction of step S273 (refer to FIG. 21) will be describedusing the flowcharts shown in FIG. 22A to FIG. 22C.

If the flow for still picture shooting processing at the time ofautomatic horizontal correction is commenced, first, the central portionrestriction of the movement range of the image sensor is released(S281). When the release button is pressed down fully and still pictureshooting commences, there may be cases where movement range of the imagesensor 105 is restricted to a central portion (when the release buttonis pressed down fully immediately after S265 Yes in FIG. 20, and stillpicture shooting processing has been commenced). At the time of stillpicture shooting, since it is desired to remove camera shake, in a casewhere movement range of the image sensor 105 has been restricted to acentral portion, this restriction is released. In this way, in step S281at least during actual exposure shooting movement restriction of theimage sensor 105 is released.

Next, exposure is commenced (S282), and body side rotational blurcorrection is performed (S283). Here, similarly to step S75, the systemcontrol section 130 performs control so as to correct rotational bluramount, among camera shake amount that has been detected by the camerashake detection section 111, and to automatically make an imagehorizontal. Specifically, an image frame becomes parallel to ahorizontal line as a result of automatic horizontal correction duringlive view. In this state, an offset component from the horizontal linedue to camera shake is rotationally corrected using body side rotationalblur correction. Specifically, the imaging drive control section 109rotationally drives the image sensor 105 so that rotational blur amountthat has been detected by the camera shake detection section 111 iscounteracted. In this case, regardless of whether image stabilization ison or off, in the case where automatic horizontal correction is on, bodyside rotational correction of the image sensor 105 is performed.

If body side rotational blur correction is performed, next, the blurstabilization flag BSC_Flg is judged (S285). As was described previously(refer to S91 in FIG. 5B), in a case where image stabilization isperformed, blur stabilization flag BSC_Flg=1 is set, while if imagestabilization is not performed blur stabilization flag BSC_Flg=0 is set.In this step, determination is based on the blur stabilization flagBSC_Flg data stored in memory within the system control section 130 orin the nonvolatile memory 122. If the result of this determination isthat BSC_Flg=0, namely that image stabilization is off, imagestabilization other than rotational blur correction is not performed.

If the result of determination in step S285 is that BSC_Flg=1, namelythat image stabilization is on, next the image stabilization lens flagSCL_Flg is judged (S287). As was described previously the imagestabilization lens flag SCL_Flg relating to image stabilization functionof the interchangeable lens that is fitted to the camera body 100 is set(refer to S93 in FIG. 5B). Specifically, in the case of a non-imagestabilization lens SCL_Flg=0 is set, in the case of an imagestabilization lens (without collaborative operation) SCL_Flg=1 is set,and in the case of an image stabilization lens (with collaborativeoperation) SCL_Flg=2 is set. In this step, determination is based on theimage stabilization flag SCL_Flg that is stored in memory within thesystem control section 130 or in the nonvolatile memory 122.

If the result of determination in step S287 is SCL_Flg=0, or thatSCL_Flg=1, namely that the interchangeable lens 200 is a non-imagestabilization lens, or is an image stabilization lens but does not havecollaborative operation, next, the image stabilization (Yaw, Pitch)capability is determined (S289). At the time that lens side imagestabilization information was acquired in step S35 (refer to FIG. 4),image stabilization (Yaw, Pitch) capability (nominal value for number ofcorrection stages) of the interchangeable lens 200 was acquired. Also,body side image stabilization capability (nominal value for number ofcorrection stages) is stored in memory within the system control section130 or in the nonvolatile memory 122. However, in the capabilitydetermination of step S289 determination uses a current residual marginof correction and not a nominal value for number of corrections stages.This is because in a state where correction members of theinterchangeable lens 200 or the camera body 100 are close to acorrection center position, a residual margin for correction is maximum,but in a state where the correction members are biased to the ends, theresidual margin is small even if nominal value for number of correctionsstages is large. The nominal value for number of corrections stages is avalue in a case where correction members are close to a correctioncenter. In this step, it is determined which image stabilization (Yaw,Pitch) capability is greater between at the body side or theinterchangeable lens side.

If the result of determination in step S289 is that capability is largerat the lens side than at the body side, then lens side angular blurcorrection (Yaw, Pitch) is performed (S291). Here, angular blurcorrection is performed at the interchangeable lens 200 side.Specifically, the camera shake detection section 209 detects camerashake amount, and the image stabilization control section 205 drives theblur correction optical system 204 based on the camera shake amount thathas been detected.

On the other hand, if the result of determination in step S289 is thatcapability is larger at the body side than at the lens side, then bodyside angular blur correction (Yaw, Pitch) is performed (S293). Here,angular blur correction is performed at the camera body 100 side 100.Specifically, the camera shake detection section 111 detects camerashake amount, and the imaging drive control section 109 drives the imagesensor 105 based on the camera shake amount that has been detected.

If angular blur correction has been performed in step S291 or S293,shift blur correction (X, Y) capability determination is next performed(S295). At the time that lens side image stabilization information wasacquired in step S35 (refer to FIG. 4), shift blur correction (X, Y)capability (nominal value for number of correction stages) of theinterchangeable lens 200 was acquired. In step S295 also, similarly tostep S289, determination uses a current residual margin of correction,and not the nominal value for number of correction stages of shift blurcorrection.

If the result of determination in step S295 is that capability is largerat the lens side than at the body side, then lens side shift blurcorrection (X, Y) is performed (S297). Here, shift blur correction isperformed at the interchangeable lens 200 side. Specifically, the camerashake detection section 209 detects shift blur amount, and the imagestabilization control section 205 drives the blur correction opticalsystem 204 based on the shift blur amount that has been detected.

On the other hand, if the result of determination in step S295 is thatcapability is larger at the body side than at the lens side, then bodyside shift blur correction (X, Y) is performed (S299). Here, shift blurcorrection is performed at the camera body 100 side. Specifically, thecamera shake detection section 111 detects shift blur amount, and theimaging drive control section 109 drives the image sensor 105 based onthe shift blur amount that has been detected.

Returning to step S287, if the result of determination in this step isthat SCL_Flg=2 has been set, specifically that the interchangeable lens200 that is attached is an image stabilization lens (with collaborativeoperation), then lens side angular blur correction (Yaw, Pitch) isperformed (S301). In the case where the interchangeable lens 200 is animage stabilization lens capable of collaborative operation, camerashake is corrected in the interchangeable lens 200 and the camera body100 by dividing camera shake amount in accordance with a specifiedratio. In this step, the image stabilization control section 205performs blur correction so that angular blur amount (Yaw, Pitch) withincamera shake amount that has been detected in the camera shake detectionsection 209 or 111 is removed.

Next, body side angular blur correction (Yaw, Pitch) is performed(S303). Here, the imaging drive control section 109 performs blurcorrection so that angular blur amount (Yaw, Pitch) within camera shakeamount that has been detected in the camera shake detection section 209or 111 is removed.

Next, lens side shift blur correction (X, Y) is performed (S305). Here,the image stabilization control section 205 performs blur correction sothat shift blur amount (X, Y) within camera shake amount that has beendetected in the camera shake detection section 209 or 111 is removed.

Next, body side shift blur correction (X, Y) is performed (S307). Here,the imaging drive control section 109 performs blur correction so thatshift blur amount (X, Y) within camera shake amount that has beendetected in the camera shake detection section 209 or 111 is removed.

If shift blur correction has been performed in step S307, if lens sideshift blur correction has been performed in step S297, if body sideshift blur correction has been performed in step S299, or if the resultof determination in step S285 is that blur stabilization flag BSC_Flg=0,it is next determined whether or not exposure has been completed(S3000). If the result of this determination is not completion,processing returns to step S283. On the other hand, if exposure has beencompleted, image data is read out and stored in the buffer memory(S3001). After reading out of image data, it is determined whether ornot the buffer memory has become full (S3002), and if the result of thisdetermination is buffer full the flow for still picture shootingprocessing at the time of automatic horizontal correction is terminatedand the originating flow is returned to. On the other hand, if theresult of determination in step S3002 is that the buffer memory is notfull, it is determined whether or not it is rapid shooting mode (S3003).If the result of this determination is rapid shooting mode, step S282 isreturned to, and the next exposure is commenced. On the other hand, ifthe result of determination is not rapid shooting mode, the flow forstill picture shooting processing at the time of automatic horizontalcorrection is terminated and the originating flow is returned to.

Next, the image processing of step S15 (refer to FIG. 3) will bedescribed using the flowchart shown in FIG. 23. This flow is executedfor image data in the buffer memory after the user has pressed theshutter button 27 down fully and still picture shooting has beenperformed.

If the flow for image processing is commenced, first image processing atthe time of normal shooting is performed (S311). Here, the imageprocessing section 107 applies various image processing that isperformed at the time of normal shooting, such as Beyer conversion, WB(white balance) correction, government conversion, picture modeprocessing, exposure correction, noise processing, edge enhancement,false color correction, etc. to image data that was acquired by theimage sensor 105.

Then, the automatic horizontal correction AHC_Flg is judged (S313). Aswas described previously the system control section 130 sets theautomatic horizontal correction flag AHC_Flg to “1” if the automatichorizontal correction button 35 is on, but sets the automatic horizontalcorrection flag AHC_Flg to “0” if the automatic horizontal correctionbutton 35 is off. In this step, determination is based on the set valueof this automatic horizontal correction flag AHC_Flg. If the result ofthis determination is AHC_Flg=0, namely that automatic horizontalcorrection is off, the flow for image processing is terminated and theoriginating flow is returned to.

On the other hand, if the result of determination in step S271 is thatAHC_Flg=1, namely that automatic horizontal correction is on, imageprocessing for at the time of automatic horizontal correction shootingis performed (S315). As was described previously, there are threeautomatic horizontal correction modes, namely mode 1-1, mode 1-2, andmode 2. Here, image processing is applied in accordance with theautomatic horizontal correction mode. Detailed operation of this imageprocessing at the time of automatic horizontal correction will bedescribed later using FIG. 24.

Next, the image processing at the time of automatic horizontalcorrection of step S315 (refer to FIG. 23) will be described using theflowchart shown in FIG. 24.

If the flow for image processing of the time of automatic horizontalcorrection is commenced, first, the automatic horizontal correction modeis determined (S321). Here, similarly to step S63 (refer to FIG. 5A),the system control section 130 determines whether or not either of mode1-1, mode 1-2, or mode 2 has been set as the automatic horizontalcorrection mode. Specifically, the system control section 130 checks theautomatic horizontal correction mode, and checks if it is a mode forperforming electronic rotation using image processing, and checks if itis a mode for performing rotation of the image sensor. It should benoted that mode 1-1 is a mode in which image data is not subjected torotation processing, and only optical image stabilization is applied.Mode 1-2 is a mode in which image data is not subjected to rotationprocessing and electronic image stabilization is performed, restrictedto while live view is in progress. Mode 2 is a mode in which image datais subjected to rotation processing during live view, and optical imagestabilization is performed. Further, in mode 2 image data rotationprocessing is performed after shooting.

If the result of determination in step S321 is mode 1-1, specificallythat rotation processing for image data will not be performed, andoptical blur correction will be performed, the image data is subjectedto resizing processing to a storage size (S323). In this case imagestabilization and automatic horizontal correction are performedcompletely with optical correction, and since rotation processing ofimage data is not performed angle of view does not become small, and sothe computational processing section 107 performs only resizingprocessing in accordance with a storage size that has been designated byimage quality mode, without trimming of image data. It should be notedthat image quality mode is set on a menu screen or the like.

If the result of determination in step S321 is mode 1-2, specificallythat rotation processing for image data will not be performed, andelectronic image stabilization will be performed, the image data issubjected to resizing processing to a storage size after having beentrimmed (S323). In this case, the image processing section 107 performselectronic image stabilization without performing rotation processing onthe image data, that is, performs trimming processing so as to removecamera shake from image data. Cutting out (trimming processing) isperformed except for a margin region for this electronic imagestabilization. The image processing section 107 resizes the image datathat has been subjected to this trimming processing to a storage sizethat has been designated by image quality mode.

If the result of determination in step S321 is mode 2, namely thatrotation processing of image data is performed after shooting, first,pre-enlargement processing is performed (S327). Here, the imageprocessing section 107 applies enlargement processing to image data thathas been acquired from the image sensor 105, and applies rotationprocessing to this image data that has been enlarged. By performingenlargement processing it is possible to prevent degradation in imagequality, such as jaggies. It should be noted that in a case where RAWhas been set as image quality mode, enlargement processing is notperformed.

Next, rotation processing of image data is performed based on the firstangle (S329). Here, the image processing section 107 performs rotationprocessing on image data that was enlarged in step S327, based on afirst angle that was detected immediately before actual exposure, orduring actual exposure.

Next, trimming and resizing processing of the image data is performed(S331). Here, the image processing section 107 cuts out (trimmingprocessing) image data from the image data that has been subjected torotation processing, so that the image data becomes level.

Next, angle fine adjustment image processing is performed (S333). Imageprocessing is performed, using automatic horizontal correction, so thatan image frame of an image becomes horizontal. However in a case wherethe image sensor 105 is rotated by the imaging drive control section109, there may be cases where performing angle adjustment precisely isdifficult. With this embodiment, therefore, images that are inclined bya specified plurality of minute angles are generated by imageprocessing, and the user selects from among these images after they havebeen generated. If the user sets specified angle interval, and number ofrotations (number of right rotations, number of left rotations), using amenu screen or the like, the image processing section 107 generates aplurality of images that are shifted by a minute angle based on thesetting values.

Once the image processing has been applied in steps S323, S325 and S333,the flow for image processing at the time of automatic horizontalcorrection is terminated, and the originating flow is returned to.

As has been described above, the imaging device of one embodiment andmodified examples of the present invention forms a subject image on animage sensor using an imaging optical system, and acquires images. Thisimaging device comprises an angular speed detection section (forexample, camera shake detection section 111) that detects angular speedthat has been applied to the imaging device, a horizontal correctioninstruction section (for example, automatic horizontal correction button35) that instructs horizontal correction of the image sensor or anoutput image of the image sensor with respect to an image frame, ahorizontal angle calculation section (refer, for example, to S159 inFIG. 8B) that detects vertical direction or horizontal direction of theimaging device or the image sensor, and calculates and outputs a firstangle around the optical axis of the image sensor in order tohorizontally correct the image sensor or an output image of the imagesensor with respect to an image frame, and an image sensor drive section(for example, the imaging drive control section 109 in FIG. 2B) thatrotates the image sensor around the optical axis based on detectionresult from the angular speed detection section or calculation resultfrom the horizontal angle calculation section.

The imaging device of the one embodiment and modified example of thepresent invention also comprises a movement range restriction section(refer, for example, to S71 in FIG. 5A, and to FIG. 7A to FIG. 7C),that, at the time of shooting standby, when rotating the image sensor,based on detection result from the angular speed detection section orcalculation result from the horizontal angle calculation section,restricts a region in which the image sensor is capable of moving to afirst region that includes a central region of the optical axis, so asto maximize an angular range in which the image sensor can rotate, and ashooting instruction section that instructs preparation or commencementof shooting (refer, for example, to the shutter button 27 of FIG. 1, theoperation section 119 of FIG. 2B, and steps S5, S9, and S11 in FIG. 3).The movement range restriction section sets a region in which the imagesensor is capable of moving to a second region that is wider than at thetime of shooting standby, and includes the first region, based oninstruction of the shooting instruction section (refer, for example, toS5 and S9 in FIG. 3, and to S261 in FIG. 20).

In this way, with the one embodiment and modified example of the presentinvention, before instructing preparation for shooting or commencementof shooting, movement range of the image sensor is restricted to a firstregion, but once preparation for shooting or commencement of shootinghas been instructed, movement range of the image sensor is made a secondregion which is wider than the first region, to relax restriction ofmovement range. Before instructing preparation for shooting orcommencement of shooting, movement range of the image sensor is madeclose to a central region of the optical axis in order to make itpossible to sufficiently demonstrate a function of automatic horizontalcorrection using image stabilization. On the other hand once preparationfor shooting or commencement of shooting has been instructed, movementrange of the image sensor is widened from the central region of theoptical axis in order to make it possible to sufficiently demonstrate afunction of image stabilization. Specifically, at the time of shootingstandby, since movement of the image sensor with shooting standby inprogress is restricted to movement in a central portion region, it ispossible to maximize a possible rotation angle range of an angularrotation section for horizontal correction, and it is possible tomaximize horizontal correction angle regardless of the extent of camerashake. Further, since movement restriction is released beforepreparation or commencement of shooting, image stabilization amount fora taken image can also be maximized. As a result, in a shooting standbystate and at the time of actual shooting it is possible to restrict sothat image stabilization and automatic horizontal correction becomeoptimum.

Also, with the one embodiment and modified example of the presentinvention, there is a reference angle storage section for storing asecond angle representing a reference angle about the optical axis ofthe image sensor (refer, for example, to FIG. 9 regarding the secondangle), and the horizontal angle calculation section respectivelyswitches between, and outputs, the first angle and the second anglebased on instruction from the horizontal correction instruction section(refer, for example, to S67, S73, and S81 in FIG. 5A). In this way thefirst angle is switched to in the case of the forming automatichorizontal correction, while the second angle (reference angle) isswitch to in the case of not performing automatic horizontal correction,and making an image frame horizontal is performed based on the first orsecond angle.

Also, with the one embodiment and modified example of the presentinvention, the image sensor drive section comprises a image sensorangular rotation section that rotationally drives the image sensor in adirection about the optical axis so that a difference betweencalculation results of the horizontal angle calculation section andangle of the image sensor at the current point in time is eliminated(refer, for example to S73 in FIG. 5A), and a rotational blur correctionsection that corrects rotational blur by rotating the image sensor in adirection about the optical axis based on output of the angular speeddetection section (refer, for example, to S75 in FIG. 5A, and S99, S119etc. in FIG. 5B). The image sensor angular rotation section rotationallydrives the image sensor at a slower rotation speed than the rotationalblur correction section (refer, for example, to FIG. 10A to FIG. 100).In this way, there is a configuration such that it is possible toseparate response speed of image angular rotation for automatichorizontal correction and response speed for rotational blur correction.Response speed for image angular rotation for automatic horizontalcorrection is slow compared to response speed for rotational blurcorrection, which means that there is no impairment to precision ofleveling due to the effects of noise caused by camera shake. Further, alive view display image no longer suffers from fine rotary rocking thatis unfavorable, and stable, favorable and convenient live view can beobtained.

Also, with the one embodiment and modified example of the presentinvention, the image sensor angular rotation section rotates the imagesensor faster as camera shake amount becomes smaller (refer, forexample, to FIG. 10A to FIG. 100). This means that the more rapidlyautomatic horizontal correction is performed, the less the effect ofnoise due to camera shake, resulting in a state such as where the camerais attached to a tripod, which means live view having good usability canbe obtained.

Also, with the one embodiment and modified example of the presentinvention, the movement range restriction section relaxes therestriction of movement range of the image sensor with shooting standbyin progress as camera shake amount become smaller and as shutter speedbecomes faster, or as focal length become shorter. Specifically sincethere is a configuration so as to relax central restriction at the timeof shooting standby depending on shooting conditions in which it isunlikely that camera shake will have an effect (such as when camerashake is small, or with fast shutter speed or short focus) live viewthat has maximum horizontal correction angle and is only slightlyaffected by camera shake can be obtained.

Also, with the one embodiment and modified example of the presentinvention, the imaging device has a display section for displaying liveview display (refer, for example, to the EVF 21 and rear surface monitor23 in FIG. 1, and to the display section 120 in FIG. 2B). This displaysection is capable of displaying automatic horizontal correction validdisplay, indicating that there is a state where automatic horizontalcorrection has been performed (refer, for example, to Roll display 120 gin FIG. 16A), and automatic horizontal correction invalid displayindicating that there is not a state where live view display has beensubjected to automatic horizontal correction (refer, for example, toRoll display 120 g in FIG. 16A). In order to prevent unsightly liveview, automatic horizontal correction is preferably performedcomparatively slowly. In this case, it becomes difficult to determinewhether or not automatic horizontal correction is completed, even if alive view image is viewed. In particular, the more difficult it becomesto determine whether or not correction is complete, the closer it getsto horizontal. It is therefore made possible for the display section todisplay automatic horizontal correction valid display indicating thatthere is a state where live view display has been subjected to automatichorizontal correction, and automatic horizontal correction invaliddisplay indicating that there is not a state where live view display hasbeen subjected to automatic horizontal correction. Because of thisstructure it is possible to prevent mistakes where shooting iserroneously performed before having sufficiently completed horizontalcorrection, and it is possible to provide a horizontal correctionfunction having good usability.

Also, with the one embodiment and modified example of the presentinvention, the display section is made capable of displaying inclinationdisplay indicating inclination amount of the imaging device (refer, forexample, to Roll display 120 g in FIG. 16D), and range displayindicating intonation range in which automatic horizontal correction ispossible (refer, for example, to automatic horizontal correction ranges120 j and 120 k in FIG. 16D. The imaging device has a limit of range forinclination at which automatic horizontal correction is possible, andcorrection cannot be performed if the photographer does not hold thecamera within a specified angle. Therefore, a spirit level is displayedon the display section in association with an automatic horizontalcorrection instruction, and together with display of current inclinationa specified angle range in which automatic horizontal correction isvalid is displayed. With this structure, it is possible for thephotographer to simply implement horizontal correction, and it ispossible to provide a horizontal correction function having goodusability.

Also, with the one embodiment and modified example of the presentinvention, the image sensor angular rotation section rotates the imagesensor faster as camera shake amount becomes smaller (refer, forexample, to FIG. 10A to FIG. 10C). The device is configured so thatrotation speed for angular correction of the image sensor at the time ofperforming automatic horizontal correction is changed in accordance withcamera shake amount. Therefore, in cases such as at the time of tripodsetting, when photographer camera shake is small etc. it is possible torapidly complete automatic horizontal correction, and it is possible toprovide an automatic horizontal correction function having goodusability.

Also, with the one embodiment and modified example of the presentinvention, the imaging device has a horizontal angle calculation sectionfor calculating and outputting a first angle about the optical axis ofthe image sensor, in order to correct an output image of the imagesensor to be leveled with respect to an image frame (refer, for example,to S159 in FIG. 8B), an image sensor drive section for rotating theimage sensor about the optical axis (for example, the imaging drivecontrol section 109), and an image processing section that performselectronic image stabilization processing for removing camera shakeamount on an image that has been acquired using the image sensor (forexample, the image processing section 107), wherein with shootingstandby in progress, the image sensor drive section rotates the imagesensor about the optical axis based on a first angle (for example, S73in FIG. 5A), and the image processing section performs electronic imagestabilization processing for removing camera shake amount on the image(for example, S103 in FIG. 5B). If automatic horizontal correction isperformed by rotating the image sensor, range of movement for imagestabilization becomes narrow. Therefore, by restricting during live viewin combination with electronic camera shake correction, both automatichorizontal correction and image stabilization are sufficientlyperformed.

Also, with the one embodiment and modified example of the presentinvention, when the imaging device has performed automatic horizontalcorrection by rotating the image sensor the image sensor drive sectionperforms rotational blur correction based on Roll output that has beendetected by the angular speed detection section (refer to S75 in FIG.5A). As a result it is possible to remove the effects of user camerashake that is generated at the time automatic horizontal correction wasperformed.

Also, with the one embodiment and modified example of the presentinvention, the imaging device performs electronic image stabilizationprocessing using the image processing section in a case where ahorizontal correction instruction has been issued, (refer, for example,to S103 in FIG. 5B), and in the case where a shooting preparationinstruction or shooting commencement instruction has been issuedperforms optical image stabilization instead of the electronic imagestabilization (refer, for example, to S283 in FIG. 22A). Sinceelectronic image stabilization is performed during live view, live viewhaving a maximum horizontal correction angle and reduced camera shakeeffect can be obtained. With this type of structure it is possible tomake image stabilization compatible with horizontal correctionthroughout shooting standby in progress and shooting in progress.

Also, with the one embodiment and modified example of the presentinvention, the imaging device comprises an angular speed detectionsection that detects angular speed that has been applied to the imagingdevice (for example, the camera shake detection section 111), ahorizontal correction instruction section (for example, automatichorizontal correction button 35) that instructs horizontal correction ofthe image sensor or an output image of the image sensor with respect toan image frame, a horizontal angle calculation section (refer, forexample, to S159 in FIG. 8B) that calculates and outputs a first anglearound the optical axis of the image sensor in order to horizontallycorrect the image sensor or an output image of the image sensor withrespect to an image frame, and an image data rotation processing section(for example the image processing section 107 in FIG. 2B) that, whenhorizontal correction has been instructed, subjects a first output imageor a second output image of the image sensor to rotation imageprocessing based on the first angle. Here, the first output image is animage that has been acquired during shooting standby (for example,during live view display), and the second output image is an image thathas been acquired during actual exposure (exposure after shootingcommencement). With the above described imaging device, since imagerotation processing is performed on a first image for live view that hasa small image size based on the first angle (horizontal correctionangle) without relying on rotation of the image sensor for anglerotation for automatic horizontal correction, it is possible to rapidlydisplay a live view image that has been subjected to automatichorizontal correction. It should be noted that by combining rotationprocessing and image stabilization that includes rotational blurcorrection using the image sensor it is possible to perform stabilizedautomatic horizontal correction display, even if some time is requiredfor image rotation processing.

Also, with the one embodiment and modified example of the presentinvention, the image processing section of the imaging device generatesfirst image data made up of a number of pixels that is smaller than anumber of pixels of the image sensor and larger than a number of displaypixels for live view, by performing enlargement processing on image datafor live view that has been output from the image sensor (refer, forexample, to S327 in FIG. 24), performs rotation processing on the firstimage data based on the first angle (refer, for example, to S329 in FIG.24), and generates an automatic horizontal correction image byperforming trimming processing on the image data that has been subjectedto this rotation processing. Also, the image processing section of theimaging device generates a second image made up of a number of pixelsthat is larger than a number of pixels of the image sensor and largerthan a number of display pixels of a storage size for storage inexternal storage, by performing enlargement processing on image data forstorage that has been output from the image sensor (refer, for example,to S327 in FIG. 24), performs rotation processing on the second imagedata based on the first angle (refer, for example, to S329 in FIG. 24),and generates an automatic horizontal correction image by performingtrimming processing on the image data that has been subjected to thisrotation processing. In this way, since there is a structure where imagerotation processing is performed based on a horizontal correction angleafter having resized image data to a large size, in shooting of a largeimage size such as a still picture it is possible to prevent imagedegradation such as the occurrence of jaggies etc. due to image rotationprocessing, even without relying on rotation using the image sensor.

Also, with the one embodiment and modified example of the presentinvention, the imaging device comprises an angular speed detectionsection that detects angular speed that has been applied to the imagingdevice (for example, the camera shake detection section 111 in FIG. 2B),an image sensor image stabilization section that performs imagestabilization while rotating the image sensor about the optical axis,based on the angular speed that has been detected by the angular speeddetection section (for example, the imaging drive control section 109 inFIG. 2B), a lens image stabilization section (for example, the imagestabilization control section 205 in FIG. 2A) that performs imagestabilization by moving a lens optical element (for example, the imagestabilization optical system 204 in FIG. 2A), and an image stabilizationcollaborative operation determination section that determines whether ornot lens image stabilization and image sensor image stabilization arecapable of collaborative operation (refer, for example, to S37 and S43in FIG. 4). Therefore, in a case where collaborative operation notpossible has been determined using the image stabilization collaborativeoperation determination section, either lens image stabilizationcontinues to be performed, or some or all of the lens imagestabilization is stopped and image sensor image stabilization isperformed by relaxing restriction on image sensor movement range (refer,for example, to S71 in FIG. 5A, and S107 and S109 in FIG. 5B), while ifcollaborative operation is possible restriction of image sensor movementrange is reduced and image sensor image stabilization is performed bycollaborative operation (refer to S79, and S111 to S119). It is possibleto respectively perform optimum image stabilization in a case wherecollaborative operation of lens image stabilization and image sensorstabilization is possible, and in a case where it is not. Also, with aconfiguration such that at the time of shooting standby movement of theimage sensor is movement restricted to a central portion region so as tomaximize possible rotation angle range of the horizontal correctionangular rotation section, and where lens image stabilization isperformed, and image sensor image stabilization amount is maximized fora taken image by releasing the movement restriction immediately beforecommencement of actual exposure, and making it possible to changecorrection distribution between lens image stabilization of thephotographing lens and image stabilization of the image sensor withshooting standby in progress and during shooting, it is possible to makehorizontal correction and image stabilization compatible with each otherfor the entire period from live view shooting standby in progress toshooting in progress.

It should be noted that with the one embodiment and modified example ofthe present invention, image stabilization (refer, for example, to FIG.5B) is performed after having performed automatic horizontal correction(refer, for example, to FIG. 5A). However, this is not limiting andautomatic horizontal correction and image stabilization may be performedin parallel, or the order in which they are performed may be switched.

Also, regarding each of the functions of the system control section 130and within the communication control section 211, besides beingimplemented in the form of software using a CPU and programs, some orall of these sections may be constructed with hardware circuits, or mayhave a hardware structure such as gate circuitry generated based on aprogramming language described using Verilog, or may use a hardwarestructure that uses software, such as a DSP (digital signal processor).Suitable combinations of these approaches may also be used. Also, thepresent invention is not limited to CPU, and elements that fulfill thefunction as a controller may be used, and each of the above describedfunctions may also be performed by one or more processors that areconfigured as hardware. For example, each function may be a processorconstructed as respective electronic circuits, and may be respectivecircuits sections of a processor that is constructed with an integratedcircuit such as an FPGA (Field Programmable Gate Array). Alternatively,a processor that is constructed with one or more CPUs may executefunctions of each section, by reading out and executing computerprograms that have been stored in a storage medium.

Also, with the one embodiment and modified example of the presentinvention, some or all of the peripheral circuits of the system controlsection 130 and communication control section 211 may be implementedusing a CPU (Central Processing Unit) and program code, may beimplemented by circuits that are executed by program code such as a DSP(Digital Signal Processor), may use a hardware structure such as gatecircuits that are generated based on a programming language describedusing Verilog, or may be executed using hardware circuits. Also, somefunctions of the CPU 31 may be implemented by circuits that are executedby program code such as a DSP, may use a hardware structure such as gatecircuits that are generated based on a programming language describedusing Verilog, or may be executed using hardware circuits.

Also, with the one embodiment and modified example of the presentinvention, an instrument for taking pictures has been described using adigital camera, but as a camera it is also possible to use a digitalsingle lens reflex camera or a compact digital camera, or a camera formovie use such as a video camera or movie camera, and further to have acamera that is incorporated into a mobile phone, a smartphone a mobileinformation terminal, personal computer (PC), tablet type computer, gameconsole etc., or a camera for medical use (for example, a medicalendoscope), a camera for a scientific instrument such as a microscope,an industrial endoscope, a camera for mounting on a vehicle, asurveillance camera etc. In any event, it is possible to adopt thepresent invention as long as a device is for taking pictures having anautomatic horizontal correction function.

Also, among the technology that has been described in thisspecification, with respect to control that has been described mainlyusing flowcharts, there are many instances where setting is possibleusing programs, and such programs may be held in a storage medium orstorage section. The manner of storing the programs in the storagemedium or storage section may be to store at the time of manufacture, orby using a distributed storage medium, or they be downloaded via theInternet.

Also, with the one embodiment of the present invention, operation ofthis embodiment was described using flowcharts, but procedures and ordermay be changed, some steps may be omitted, steps may be added, andfurther the specific processing content within each step may be altered.It is also possible to suitably combine structural elements fromdifferent embodiments.

Also, regarding the operation flow in the patent claims, thespecification and the drawings, for the sake of convenience descriptionhas been given using words representing sequence, such as “first” and“next”, but at places where it is not particularly described, this doesnot mean that implementation must be in this order.

As understood by those having ordinary skill in the art, as used in thisapplication, ‘section,’ ‘unit,’ ‘component,’ ‘element,’ ‘module,’‘device,’ ‘member,’ ‘mechanism,’ ‘apparatus,’ ‘machine,’ or ‘system’ maybe implemented as circuitry, such as integrated circuits, applicationspecific circuits (“ASICs”), field programmable logic arrays (“FPLAs”),etc., and/or software implemented on a processor, such as amicroprocessor.

The present invention is not limited to these embodiments, andstructural elements may be modified in actual implementation within thescope of the gist of the embodiments. It is also possible form variousinventions by suitably combining the plurality structural elementsdisclosed in the above described embodiments. For example, it ispossible to omit some of the structural elements shown in theembodiments. It is also possible to suitably combine structural elementsfrom different embodiments.

What is claimed is:
 1. An imaging device, that forms a subject image onan image sensor using an imaging optical system, and acquires an image,comprising: an angular speed detection sensor that detects angular speedof the imaging device; a horizontal correction instruction interface forinstructing horizontal correction of the image sensor or an output imageof the image sensor with respect to an image frame; a processor having ahorizontal angle calculation section that detects vertical direction orhorizontal direction of the imaging device or the image sensor, andcalculates and outputs a first angle around the optical axis of theimage sensor in order to horizontally correct the image sensor or anoutput image of the image sensor with respect to an image frame; animage sensor drive actuator that rotates the image sensor around theoptical axis based on detection result from the angular speed detectionsensor or calculation result from the horizontal angle calculationsection; and a shooting instruction interface for instructingpreparation or commencement of shooting, wherein, the processor furthercomprises a movement range restriction section, the movement rangerestriction section, at the time of shooting standby, when rotating theimage sensor based on detection result from the angular speed detectionsensor or calculation result from the horizontal angle calculationsection, restricting a region in which the image sensor is capable ofmoving to a first region that includes a central region of the opticalaxis, so as to maximize an angular range in which the image sensor canrotate; and wherein based on an instruction of the shooting instructioninterface, the movement range restriction section sets a range in whichthe image sensor is capable of moving to a second region that includesthe first region, and is wider than at the time of shooting standby. 2.The imaging device of claim 1, further comprising: a reference anglememory that stores a second angle representing a reference angle aroundthe optical axis of the image sensor, and wherein the horizontal anglecalculation section switches between and outputs the first angle and thesecond angle based on instruction of the horizontal correctioninstruction interface.
 3. The imaging device of claim 2, wherein: theimage sensor drive actuator comprises an actuator for image sensorangular rotation that subjects the image sensor to rotational drive in adirection around the optical axis so that there is no difference betweencalculation result of the horizontal angle calculation section and theangle of the image sensor at a current time, and an actuator forrotational blur correction that corrects rotation variation by rotatingthe image sensor in an optical axis direction based on output of theangular speed detection sensor, wherein the actuator for image sensorangular rotation subjects the image sensor to rotational drive at arotation speed that is slower than the actuator for rotational blurcorrection.
 4. The imaging device of claim 3, wherein: the actuatorsection for image sensor angular rotation rotates the image sensorfaster for smaller camera shake amount.
 5. The imaging device of claim1, wherein: the movement range restriction section relaxes therestriction with shooting standby in progress as image stabilizationbecomes smaller.
 6. The imaging device of claim 1, wherein: the movementrange restriction section relaxers the restriction with shooting standbyin progress as shutter speed becomes faster.
 7. The imaging device ofclaim 1, wherein: the movement range restriction section relaxes therestriction with shooting standby in progress as focal length becomesshorter.
 8. The imaging device of claim 1, further comprising: a displayfor displaying live view display, wherein it is made possible for thedisplay to display automatic horizontal correction valid displayindicating that there is a state where automatic horizontal correctionhas been performed, and automatic horizontal correction invalid displayindicating that there is not a state where live view display has beensubjected to automatic horizontal correction.
 9. The imaging device ofclaim 1, further comprising: a display for displaying live view display,wherein the display is capable of displaying inclination amountrepresenting inclination amount of the imaging device, and range displayindicating inclination range in which automatic horizontal correction ispossible.
 10. The imaging device of claim 1, wherein: the movement rangerestriction section relaxes restriction with shooting standby inprogress after there is no longer a difference between a calculationresult from the horizontal angle calculation section and angle of theimage sensor at the current point in time.
 11. A control method, for animaging device that forms a subject image on an image sensor using animaging optical system, and acquires an image, comprising: determiningwhether or not horizontal correction of the image sensor or an outputimage of the image sensor with respect to an image frame has beeninstructed; detecting angular speed of the imaging device; detectingvertical direction or horizontal direction of the imaging device or theimage sensor, and calculating a first angle about the optical axis ofthe image sensor in order to horizontally correct the image sensor or anoutput image of the image sensor with respect to an image frame;rotating the image sensor about the optical axis based on detectionresult of the angular speed, or the first angle; at the time of shootingstandby, when rotating the image sensor based on detection result of theangular speed or the first angle, restricting a region in which theimage sensor is capable of moving to a first region that includes acentral region of the optical axis, so as to maximize an angular rangein which the image sensor can rotate; and in a case where preparation orcommencement of shooting has been instructed, setting a region in whichit is possible to move the image sensor to a second region that includesthe first region, and that is wider than at the time of shootingstandby.
 12. The control method for an imaging device of claim 11,further comprising: storing a second angle representing a referenceangle around the optical axis of the image sensor in a reference anglememory; and when calculating the first angle, switching to andoutputting either of the first angle and the second angle in accordancewith instructions to perform the horizontal correction.
 13. The controlmethod for an imaging device of claim 12, further comprising: whenrotating the image sensor about the optical axis, subjecting the imagesensor to rotational drive in a direction about the optical axis so thatthere is no longer a difference between a result of having calculatedthe first angle about the optical axis of the image sensor, and angle ofthe image sensor at the current point in time, and correcting rotationalblur by rotating the image sensor in a direction about the optical axis,based on the angular speed detection result, wherein, when performingrotational drive about the optical axis of the image sensor, subjectingthe image sensor to rotational drive at a slower rotation speed than forthe rotational blur correction.
 14. The control method for an imagingdevice of claim 13, further comprising: at the time of rotating theimage sensor about the optical axis, rotating the image sensor fasterfor smaller camera shake amount.
 15. The control method for an imagingdevice of claim 11, further comprising: when restricting movementpossible range of the image sensor, relaxing the restriction withshooting standby in progress for smaller image stabilization amount. 16.The control method for an imaging device of claim 11, furthercomprising: when restricting movement possible range of the imagesensor, relaxing the restriction with shooting standby in progress forfaster shutter speed.
 17. The control method for an imaging device ofclaim 11, further comprising: when restricting movement possible rangeof the image sensor, relaxing the restriction with shooting standby inprogress for shorter focal length.
 18. The control method for an imagingdevice of claim 11, further comprising: displaying a live view image;and when displaying the live view image, making it possible to displayautomatic horizontal correction valid display indicating that there is astate where automatic horizontal correction has been performed, andautomatic horizontal correction invalid display indicating that there isnot a state where live view display has been subjected to automatichorizontal correction.
 19. The control method for an imaging device ofclaim 11, further comprising: displaying a live view image; and at thetime of display of the live view image, making it possible to displayinclination amount representing inclination amount of the imagingdevice, and range display indicating inclination range in whichautomatic horizontal correction is possible.
 20. The control method foran imaging device of claim 11, further comprising: when restrictingmovement possible range of the image sensor, relaxing the restrictionwith shooting standby in progress after a difference between a result ofhaving calculated the first angle about the optical axis of the imagesensor, and angle of the image sensor at the current point in time, hasbeen removed.